dynalyticssite

Tutorials

Self-hosted tutorials, served by GitHub Pages at https://dynasite.org/tutorials/<package>/<slug>.html.

Full reference (architecture, build commands, limits): ../docs/TUTORIALS.md. This file is the at-the-folder quick start.

The folder is the source of truth. Every tutorials/<package>/<slug>.html is auto-registered as a tutorial — no sources.json editing. Its title and description are read from the file’s own <head> (the title: and description:/subtitle: you wrote in the qmd front-matter).

Add a tutorial — write & push

  1. Render your tutorial to a single self-contained HTML (Quarto embed-resources: true, or rmarkdown self_contained: true).
  2. Drop it in the package folder: tutorials/<package>/<slug>.html (make a new folder when a package gets its first tutorial).
  3. Build & push:
    npm run tutorials      # offline rebuild — scans this folder, updates the catalog
    git add tutorials catalog.json assets/catalog.js
    git commit -m "tutorials: add <slug>" && git push
    

That’s it. The tutorial appears in the Readings menu and on its package dossier automatically, with its package badge.

Keep the files small (one-time habit, not a per-tutorial chore)

Quarto exports plots at retina DPI, which can make a single file 50–75 MB. Two ways to avoid the bloat:

Notes