SeanPedersen/seanpedersen.github.io

Blog

★ 3Forks 1RustGitHub ↗Compare

Project website ↗

README

Sean's Blog

Custom static site generator using Rust - builds a minified build in <200ms.

Selected Articles

Setup

Just clone this repo, create a new github project named $your_username.github.io, follow instructions below and push the modified repo up (on each push the site is getting rebuild and published via Github pages).

  • Posts live in ./posts/ as normal markdown files
    • date can be added as top metadata or not (falls back to git first added)
    • icon path can be added as top metadata (optional)
    • tags can be specified at file end: #tag1 #tag2
  • Blog name (etc) in ./website/index/index.html (search heading2Xl)
  • Profile pic in ./website/images/profile.webp
  • Search for "https://github.com/SeanPedersen/seanpedersen.github.io" and change it to your repo so the "Edit on GitHub" link works for your blog

Local

  • Install Rust
  • Compile: cargo build --release
  • Build: ./target/release/blog-builder (generates out/ directory)
  • Serve locally: python3 -m http.server -d out (http://localhost:8000)

Usage

Just add a markdown file in posts/ dir. The first markdown h1 block (# title) is used as blog title. Create date is inferred from git. Frontmatter metadata is optional to add an icon or change the date. Commit and push the new markdown file and the post is online.

Credits

Contributors

SeanPedersenriscdanger

Issues