Static website generator for my blog
  • Rust 78.3%
  • HTML 11.7%
  • CSS 7.6%
  • JavaScript 2.1%
  • Shell 0.3%
Find a file
2026-03-06 14:38:49 +01:00
.github/workflows Fix yaml formatting 2022-02-27 20:32:51 +00:00
content chore: reviews 2026-03-06 14:38:49 +01:00
pages chore: github -> Codeberg 2026-02-14 09:46:33 +01:00
src fix: compiler warnings 2026-02-10 14:30:17 +01:00
static fix: add honeypot for newsletter bots 2025-01-26 18:25:14 +01:00
sublime Update all deps (#21) 2024-06-05 11:30:20 +02:00
templates chore: fix plausible link 2025-05-05 15:30:16 +02:00
.gitignore Create atom feed 2022-05-06 10:58:53 +02:00
Cargo.lock chore: fix syntect build 2025-05-05 16:06:32 +02:00
Cargo.toml chore: fix syntect build 2025-05-05 16:06:32 +02:00
configuration.yaml feat: generate sitemap and robots.txt (#30) 2024-06-16 23:07:04 +02:00
dev.sh fix: kill processes when exiting dev script 2024-10-06 22:55:43 +02:00
publish.sh chore: add publish script 2024-09-24 16:00:00 +02:00
README.md feat: add publish draft flag 2024-07-05 14:50:51 +02:00

Emmett

A reinvent the wheel project in Rust: static website generator for my blog.

Configuration

Paths are configurable in configuration.yaml.

Running

cargo run

Then serve the output/ directory using a web serve. For example, I'm using simple-http-server:

simple-http-server -i output

If you want to publish drafts too (can be handy when working locally) you have to pass the -p flag:

cargo run -- -p

Watch for changes

watchexec -e md cargo run

or to see drafts:

watchexec -e md cargo run -- -p

Deploy

rsync -avz --delete output/ vjousse@emmett.jousse.org:/home/data/vincent.jousse.org

Nginx rewrite rules

rewrite ^/rss.xml$ /atom.xml permanent;

# Do not rewrite the exact URL /blog/fr/
if ($request_uri = /blog/fr/) {
  break;
}

# Do not rewrite URLs starting with /blog/fr/tech
if ($request_uri ~* ^/blog/fr/tech) {
   break;
}

# Do not rewrite URLs starting with /blog/fr/perso
if ($request_uri ~* ^/blog/fr/perso) {
   break;
}

# Rewrite URLs of type /blog/fr/something (with exactly one path component) to /blog/fr/perso/something
# Avoid rewriting URLs that already contain /perso/ immediately after /fr/
# Old blog urls
rewrite ^/blog/fr/(?!perso/)([^/]+)/?$ /blog/fr/perso/$1 permanent;

Goaccess configuration

goaccess /var/log/nginx/vincent.jousse.org.access.log -o /home/data/report.html --log-format=COMBINED --ignore-crawlers --ignore-referrer=*.jousse.org --real-os --restore --persist --real-time-html --daemonize