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 docsThe command builds the site into a temporary folder. Then it lists what smalldocs does not read:
- each option that smalldocs ignores
- each broken link
- each piece of Pandoc’s Markdown that smalldocs does not read, with its file and its line
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.ymland 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,.mdor.ipynbfile becomes a link to the.htmlfile. 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-tabsetand.quarto-grid-item. So most CSS that was written for a Quarto site works. - smalldocs runs
pre-renderandpost-renderwith the same environment variables as Quarto.
Move a project
- Run
smalldocs check, and fix what it lists. - Run
smalldocs preview. Compare each page with the page that Quarto made. - In the recipe that builds the site, change
quarto rendertosmalldocs render. Changequarto publish gh-pagestosmalldocs publish gh-pages. - If the project has its own
apidocs.py, think about theapiof smalldocs instead. See The API reference. - When Quarto no longer builds the project, change
_quarto.ymlto_smalldocs.yml. See A _quarto.yml.