Static site generator and content for the Chatterino website.
cargo runThat puts the site into out/.
Use your preferred static HTTP server to serve it locally. For example:
npx serve outThe site is made up of minijinja templates, with some Rust code to render it.
The build process:
- Constructs a
minijinjaenvironment fromtemplates - Reads all content in
pagesand renders each.j2file into the output dir - Copies
publicandstylesinto the output dir
Configuration is split between .env.* files and links.json.
Various components are exposed from Rust. These are mostly used in the changelog.
credit(author="A, B", helper="C", prs="1234", inline=true): attributiongithub_user("name"): inline GH profile icon + linkfigure("path/to/img/or/video.png", caption="Text under the media"): annotated mediaredirect("https://example.com"): creates redirect pages{% filter callout("note") %} ... {% endfilter %}: highlights
Some globals are also exposed:
links, which holds content fromlinks.json
Comments in .j2 files are written {! ... !}, because the default {# collides with the {#heading-id} markdown syntax.
TWITCH_OAUTH_CLIENT_ID and TWITCH_OAUTH_REDIRECT_URL configure the login page.
You can configure these in .env.development (cargo run -- --dev) and .env.production (cargo run -- --prod)