HTML generator for best-of lists, especially Best of Typst (TCDM).
It loads metadata fetched by the canonical best-of-generator, and generates an HTML index page.
Usage
-
Follow the official instruction for creating a best-of list, and trigger at least one update.
-
Run
typst init @preview/tcdm:0.0.2 typat the root of the project. This should create atyp/directory next toprojects.yaml. -
Edit
typ/main.typand replace placeholder contents with real ones.
#let (configuration, statistics, assets, body) = load(
- projects-data: json(placeholder.latest-history-json),
- projects-yaml: yaml(placeholder.projects-yaml),
+ projects-data: json("/build/latest.json"),
+ projects-yaml: yaml("/projects.yaml"),
)
- Append the following to your build script, and publish the
build/directory.
mkdir -p build
# Convert best-of-generator's python-specific CSV to JSON.
uv run typ/history_to_json.py > build/latest.json
# Generate the HTML index page. (Available localizations: en, zh.)
typst compile typ/main.typ build/index.html --root . --features html --input lang=en
License
-
The source code of this generator is licensed under GPL-3.0, as some of its files originate from the canonical best-of-generator (GPL-3.0).
-
The example scaffold is licensed under MIT-0 for ease of use.
Note that these licenses are different from CC BY-SA 4.0 used by the main TCDM project.
Changelog
0.0.2
Add the missing zh translation for Show {} hidden projects… at the end of each category. This text is shown only if there is at least one hidden project in the category.
0.0.1
Initial release derived from the TCDM project.