How kazuyanagimoto/quarto-clean-typst works
Project Type & Purpose
• This is an open-source Quarto extension/template (“quarto-clean-typst”) that provides a minimalistic presentation theme based on Typst.
• It plugs into the Quarto CLI and relies on Typst (with Touying libraries) to render PDF/HTML slides.
High-level Components
a. User / Author
• Writes .qmd files (slides) using the provided template.
b. Quarto CLI
• Core engine that discovers extensions under _extensions/clean.
• Drives the rendering pipeline (Markdown/Typst → PDF/HTML).
c. Extension Layer (_extensions/clean)
• extension.yml – declares the theme and filters.
• revealjs.lua / shortcodes.lua – Lua filters for Quarto.
• typst-environment.lua / .typ templates – glue Typst code into Quarto.
• typst-show.typ & typst-template.typ – Typst theme definitions.
d. Static Assets (static/img, static/references.bib)
• Logos, thumbnails, bibliography files.
e. Template Files (template*.qmd, touying-quarto-clean/template/main.typ)
• Starter .qmd documents and Typst source for the bundled template.
f. Custom Typst Configuration (custom.typ, typst.toml)
• User-centric Typst overrides and project settings.
g. Dependency & Environment Management
• renv/ & renv.lock – R package ecosystem lockfile.
• air.toml – task runner config.
• Justfile – shortcut commands for build/test/publish.
h. CI / CD (.github/workflows)
• publish.yml – automates release packaging.
• typst-release.yml – publishes Typst artifacts.
Interactions & Data Flow
1. Development Flow
• Dev runs just setup → installs Quarto extension, Typst libs, R packages (renv activate).
• Dev writes/edits theme files, runs just build or quarto preview to test.
2. Rendering Flow (End-user)
• User installs via quarto install extension kazuyanagimoto/quarto-clean-typst.
• Quarto CLI loads _extensions/clean and applies Lua filters + Typst templates.
• Quarto invokes Typst compiler (with Touying) to produce final PDF/HTML.
3. Release Flow
• GitHub Actions trigger on push/tag → run tests, build theme, publish to Quarto registry and GitHub Releases.
Architectural Patterns & Principles
• Plugin Architecture: Quarto discovers and loads extensions under _extensions.
• Separation of Concerns:
– Typst code (*.typ) separate from Quarto filters (*.lua).
– Static assets in static/.
– Templates in root vs. nested repo copy (touying-quarto-clean/).
• Infrastructure as Code: CI workflows and Justfile automate build & release.
[ ] Main components clearly labeled (User, Quarto CLI, Extension, Typst Compiler, Static Assets, CI/CD)
• how Quarto discovers and loads the extension
• how Lua filters and Typst templates are invoked
• how output artifacts (PDF, HTML) are generated
• how CI workflows publish to the Quarto registry and GitHub
[ ] Grouped modules (Developer Tooling vs. Runtime)