From Quarto

What is different from Quarto, and how to check a project before you move it.

smalldocs builds the website part of Quarto. A project that uses only that part builds with either tool. The two builds give the same pages, the same anchors and the same links.

Check a project first:

smalldocs check docs

The command builds the site into a temporary folder. Then it lists what smalldocs does not read:

If the command finds anything, its exit code is 1.

What smalldocs does not do

Quarto smalldocs
PDF, Word, slides, books, manuscripts Websites only. A book is built as a website
Runs {python}, {r} and {ojs} cells Shows the code and runs nothing. A notebook shows its saved outputs
Compiles .scss themes Takes any Bootswatch theme and your CSS. See Themes
Lua filters Runs no Lua. The linkify of smalldocs does the work of linkify.lua
Grid tables, citations, cross-references (@fig-x) Does not read them. Write a pipe table, and a link to the id
Every Pandoc extension CommonMark, tables, footnotes, definition lists, task lists, attributes, divs, callouts, tabsets, maths, raw HTML, shortcodes
Algolia search, comments, analytics A search box over search.json. Add the others with include-in-header

What is the same

  • smalldocs reads _quarto.yml, and merges it with _metadata.yml and front matter in the same order as Quarto.
  • smalldocs makes the ids of headings by the rules of Pandoc. So links and anchors that were written for Quarto keep working.
  • A link to a .qmd, .md or .ipynb file becomes a link to the .html file. A link that starts with / starts at the root of the project.
  • The HTML of the page has the same classes and ids as in Quarto, such as #quarto-sidebar, #TOC, .callout-note, .panel-tabset and .quarto-grid-item. So most CSS that was written for a Quarto site works.
  • smalldocs runs pre-render and post-render with the same environment variables as Quarto.

Move a project

  1. Run smalldocs check, and fix what it lists.
  2. Run smalldocs preview. Compare each page with the page that Quarto made.
  3. In the recipe that builds the site, change quarto render to smalldocs render. Change quarto publish gh-pages to smalldocs publish gh-pages.
  4. If the project has its own apidocs.py, think about the api of smalldocs instead. See The API reference.
  5. When Quarto no longer builds the project, change _quarto.yml to _smalldocs.yml. See A _quarto.yml.