🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

personal website

A bare-bones static site generator + web server in one.

  • posts/*.mddist/posts/*.html
  • main.mddist/index.html (the {{posts}} marker is replaced by the auto-generated post list)
  • LaTeX math ($...$, $$...$$) is rendered to self-contained SVG at build time by RaTeX (no client JS, no CDN)
  • Empty .md files are skipped

Usage

cargo build --release

./target/release/website build        # generate dist/
./target/release/website serve 8000   # build, then serve dist/ on 0.0.0.0:8000

Writing a new post = drop a .md file in posts/ and re-run build. The title comes from the post's first # heading; the URL slug is that title, lowercased and hyphenated. (If a post has no # heading, the filename is used instead.) Optionally add a line like ### date: 29 Nov, 2025; that date appears next to the title on the main page, and parseable DD Mon, YYYY dates sort posts newest-first before undated or unparseable posts.

Deploying to a VPS

# on the VPS, with the repo checked out and Rust installed:
cargo build --release
./target/release/website serve 80      # needs root/cap for port 80

To keep it running, drop a systemd unit at /etc/systemd/system/website.service:

[Unit]
Description=website
After=network.target

[Service]
WorkingDirectory=/path/to/blog
ExecStart=/path/to/blog/target/release/website serve 8000
Restart=always

[Install]
WantedBy=multi-user.target

Then systemctl enable --now website. Put nginx/caddy in front for TLS, or point it at port 8000 directly.

Redeploying

The systemd unit's ExecStart rebuilds from the latest checkout on every start, so after pushing changes just restart the service on the VPS:

ssh <your-vps> 'systemctl restart website'

its aliased as update-website

Deploying static assets (images, fonts)

static/ is gitignored, so its files don't reach the VPS via git push. Use the helper to rsync them up and restart the service (which rebuilds dist/):

./deploy-static.sh            # uses the `website` ssh host alias
./deploy-static.sh other-host # or target a different host

Web-bound images belong in static/ as already-compressed .webp (the server maps the webp extension to image/webp); reference them from a post as /<name>.webp.

About

personal website.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages