Migrating from quartodoc
A site built with quartodoc keeps all of its settings in _quarto.yml: the API reference under quartodoc:, and the navbar, sidebars, theme and resources under Quarto’s own keys. Great Docs keeps its settings in great-docs.yml and writes _quarto.yml itself on every build. Migrating means moving each setting to the key that replaces it, and checking the pages and files that Great Docs adds by default.
The examples on this page come from Sciris, whose Quarto site has a module-per-page reference under api/, root pages such as overview.qmd and 404.qmd, a tutorials/ directory, two sidebars, a custom footer and a light and dark theme.
Key Differences
| quartodoc | Great Docs | |
|---|---|---|
| Config file | _quarto.yml (under a quartodoc: key) |
great-docs.yml |
| API discovery | Manual: you list every object | Automatic: discovers your public API from source |
| Build command | quartodoc build then quarto render |
great-docs build (handles both steps) |
| Preview command | quarto preview |
great-docs preview |
| Generated output | reference/ directory with .qmd files and _sidebar.yml |
docs/_quarto/default/ project (generated, gitignored) |
| Sidebar | You include a generated _sidebar.yml via metadata-files |
Managed automatically |
Initial Setup
Run great-docs init in the project root. It discovers your package and writes docs/great-docs.yml. When your Quarto site already lives in docs/, as Sciris’s does, the configuration lands beside your existing pages, and they can stay where they are.
Keep the old _quarto.yml open while you work through the key mapping, then delete it. Delete the directory of .qmd files that quartodoc build wrote too (reference/, or the dir you set), after moving any hand-written text out of it. Sciris’s api/index.qmd introduction, for example, belongs in reference.desc.
Key Mapping
Each row names a key in _quarto.yml and the great-docs.yml key that replaces it.
quartodoc or _quarto.yml |
great-docs.yml |
|---|---|
quartodoc.package |
module, only when the import name differs from the project name |
quartodoc.title |
reference.title |
quartodoc.dir |
reference.output (see Reference Directory) |
quartodoc.sections |
reference.sections (see Reference Layout) |
quartodoc.parser |
parser |
quartodoc.render_interlinks |
Delete it. Links in docstrings always resolve. |
quartodoc.style |
Delete it. |
interlinks.sources |
interlinks.sources, with the same url for each source |
interlinks.aliases for another project |
aliases on that project’s entry in interlinks.sources |
interlinks.aliases for your own package |
interlinks.aliases |
interlinks.fast, interlinks.autolink, filters: [interlinks] |
Delete them. Great Docs links references and inline code itself. |
format.html (theme, css, toc, highlight-style, …) |
quarto.format.html (see Themes) |
website.title |
display_name |
website.site-url |
site_url |
website.favicon |
favicon |
website.image |
social_cards.image |
website.navbar.logo |
logo |
website.navbar, website.sidebar, website.page-footer, website.search, website.repo-url, website.repo-actions |
quarto.website (see Navigation and Footer) |
website.bread-crumbs |
breadcrumbs |
project.resources |
site_root.files, or llms_txt.index and llms_txt.full for the llms files (see Pages and Files) |
project.pre-render |
pre_render |
execute.freeze |
freeze, which is auto by default |
The interlinks rows carry over almost unchanged. Sciris’s aliases move onto their sources, and its own entry, sciris: [null, sc], becomes one key:
docs/great-docs.yml
interlinks:
aliases: [sc]
sources:
python:
url: https://docs.python.org/3/
numpy:
url: https://numpy.org/doc/stable/
aliases: [np]With aliases: [sc], `sc.findinds()` links to Sciris’s own reference page. The null entry has no counterpart: Great Docs already accepts a short name such as [](`findinds`) when only one documented object answers to it. See An Alias for Your Own Package.
Put post-render scripts under quarto.project.post-render. Both this setting and pre_render accept script paths relative to great-docs.yml. Move arguments such as the pre in python quarto_utils.py pre into the script itself or a wrapper script.
Reference Layout
The sections structure (title, desc, contents) is the same in both tools, so it moves from quartodoc.sections to reference.sections. The differences below change what the reference looks like.
Module Entries
A module listed as a bare string expands into its members, and each member becomes an entry of its own with its own page:
docs/great-docs.yml
reference:
sections:
- title: Math and array tools
contents:
- sc_math # expands into every public function and class in sc_mathFor Sciris that produces about 560 pages instead of quartodoc’s one page per module. To keep one page per module, write each module as a mapping and keep its members on its page:
docs/great-docs.yml
members_on_same_page: true
reference:
title: API reference
sections:
- title: Math and array tools
desc: "Quiz: how do you return the indices of a vector ..."
contents:
- name: sc_math
- name: sc_asdWithout members_on_same_page: true, a module with more than max_members_on_same_page members (five by default) gives each member its own page. To keep members together for some modules only, set members_on_same_page: true on those entries instead. See Member Page Placement.
Suppressing Members
quartodoc uses members: [] to leave a class’s methods off its page. Great Docs uses members: false:
docs/great-docs.yml
- name: MyClass
members: falseReference Directory
quartodoc’s dir becomes reference.output. Sciris publishes its reference under api/:
docs/great-docs.yml
reference:
output: apiThe pages, the navbar link, objects.inv and cross-references all use api/. The value is one directory name, not a nested path such as docs/api. See URL Path.
Pages and Files
A Quarto site keeps pages in its project directory and lists extra files in project.resources. Great Docs publishes the same things from the directory that holds great-docs.yml.
Root Pages
A .qmd or .md page beside great-docs.yml publishes at the site root under its own name, as a page beside _quarto.yml does. Sciris’s overview.qmd, whatsnew.qmd, style_guide.qmd and 404.qmd publish as overview.html, whatsnew.html, style_guide.html and 404.html without any setting. A name that starts with _ stays unpublished, and site_root.pages can list the pages to publish, or turn them off with false.
404.qmd never gets a navbar link and stays out of the sitemap. Set site_url as well, so that the page keeps its styles at any address.
{{< var version >}} keeps working with a _variables.yml beside the configuration.
Your Quarto extensions stay in _extensions/ beside the configuration, and their shortcodes keep working. A filter extension listed under filters in _quarto.yml moves to quarto.format.html.filters. An extension can’t share a name with one Great Docs bundles, so delete quartodoc’s _extensions/machow/interlinks/, or the build stops and names it. Great Docs links references itself.
See Pages Beside the Configuration for the full rules.
Directories of Pages
A directory such as tutorials/ can stay where it is. List it under sections and it publishes at the same path, with its own sidebar and a navbar item:
docs/great-docs.yml
sections:
- title: Tutorials
dir: tutorialsAn index.qmd inside the directory becomes the section’s landing page, so Sciris’s tutorials.qmd can move to tutorials/index.qmd. See Custom Sections. Narrative pages can also go into user_guide/, which gives them the User Guide’s sidebar and ordering (see User Guides), but nothing requires the move.
Files at the Site Root
Other files publish only when site_root.files lists them. This replaces project.resources:
docs/great-docs.yml
site_root:
files: [CNAME, api.json]
pre_render: build_api_index.pyBoth publish unchanged at the site root. api.json does not exist until the pre_render script writes it into the build directory, and a listed name that matches no file still publishes once a script writes it.
Some names stay with Great Docs. objects.inv is written by Great Docs, so drop it, and drop quartodoc’s objects.json. A project that writes its own llms.txt and llms-full.txt sets llms_txt.index and llms_txt.full instead of listing them, and the files must exist before the build starts (see Supplying Your Own Files).
Includes
Write include paths relative to the page that contains them, as in Quarto. Sciris’s whatsnew.qmd keeps its include unchanged:
docs/whatsnew.qmd
{{< include ../CHANGELOG.md >}}See Includes.
Themes
Your format: html: block copies unchanged into great-docs.yml, under quarto. Its file paths, such as theme .scss files and css files, are relative to great-docs.yml, so they keep working when it sits where _quarto.yml was:
docs/great-docs.yml
quarto:
format:
html:
theme:
light: [cosmo, assets/styles-light.scss]
dark: [cosmo, assets/styles-dark.scss]
css: assets/styles.css
toc-depth: 5
highlight-style: githubGreat Docs reads or manages some of these keys; see Quarto HTML Settings.
A theme with light and dark entries gets one toggle in the navbar, Great Docs’ own, which switches between the two themes. Quarto’s toggle is hidden, unless dark_mode_toggle: false removes Great Docs’ toggle. Great Docs’ colours for the page background, navbar and sidebar still apply over both themes. See Dark Mode Toggle.
Default Pages and Features
Great Docs adds pages and features that a Quarto site did not have. Check each one after the first build:
| What appears | Source | To turn it off or replace it |
|---|---|---|
| A hero banner on the homepage | A logo | hero: false |
| A Changelog page and navbar item | GitHub or GitLab releases | changelog.enabled: false |
| Contributing and code of conduct pages, linked from the homepage | CONTRIBUTING.md, CODE_OF_CONDUCT.md |
Put contributing.qmd or code-of-conduct.qmd beside great-docs.yml |
| A security policy page | SECURITY.md |
show_security: false |
| A Package Info page | pyproject.toml dependencies |
package_info_page: false |
llms.txt and llms-full.txt |
The API reference | llms_txt.index, llms_txt.full, or llms_txt.enabled: false |
| “Site created with Great Docs” in the footer | attribution: false |
The community pages have no switch, but a page of the same name beside great-docs.yml replaces the generated one. Sciris’s contributing.qmd does so without changes. Its conduct.qmd would publish beside a generated code-of-conduct.html, so rename it to code-of-conduct.qmd and update the links to it. See Community Files and llms.txt.
Building and Previewing
Run great-docs build, then great-docs preview. The build log warns about problems a migration tends to leave behind, such as a generated page that no navbar item or sidebar reaches, or a file in site_root.files that the site does not contain.
Next Steps
- Configuration lists every
great-docs.ymloption - API Documentation covers reference sections and member placement
- Custom Sections covers sections, root pages and site-root files
- Cross-Referencing covers links, interlinks and aliases