Documentation
Project Structure
your-site/
├── didactic.toml
├── content/
│ └── index.typ
├── templates/
│ ├── index.html
│ └── main.scss
└── dist/
Config File
Generally self explanatory. The links will be compiled in at the slug.
[site]
title = ""
author = ""
base_url = "https://example.com"
[[links]]
slug = "name"
path = "path/to/content/dir"
Typst
All content is written in Typst files placed in the content/ directory. Each file becomes an HTML page at the same relative path.
Document Metadata
Every page needs to declare a title and optionally a date. Pages without a date are not included in RSS.
#set document(title: "", date: datetime(year: 1970, month: 1, day: 1))
Math
Math has to be rendered using html.frame, which produces inline SVGs. This can be done automatically by putting this at the top of your document:
#show math.equation: it => html.frame(it)
Then write math as normal.
$ x = (-b plus.minus sqrt(b^2 - 4a c)) / (2a) $
Becomes:
Templates
Didactic uses Tera for templating.
Template Variables
site.title- From
didactic.toml site.author- From
didactic.toml site.base_url- From
didactic.toml menu- List of pages for navigation. Each menu item exposes
title,url,section, andchildren. Children are only used on index pages. content- Rendered content
current_section- Current directory name