# Migrating from quartodoc

A site built with [quartodoc](https://machow.github.io/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](https://docs.sciris.org), 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](#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](#reference-directory)) |
| `quartodoc.sections` | `reference.sections` (see [Reference Layout](#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](#themes)) |
| `website.title` | [display_name](../reference/great_docs.rendering.ObjectRenderer.display_name.md) |
| `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](#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](#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:

``` yaml
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](cross-referencing.md#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](../reference/great_docs.rendering.ReferenceIndexRenderer.sections.md) structure ([title](../reference/great_docs.rendering.BaseRenderer.title.md), `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:

``` yaml
reference:
  sections:
    - title: Math and array tools
      contents:
        - sc_math        # expands into every public function and class in sc_math
```

For 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:

``` yaml
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_asd
```

Without `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](api-documentation.md#member-page-placement).

### Suppressing Members

quartodoc uses `members: []` to leave a class's methods off its page. Great Docs uses `members: false`:

``` yaml
- name: MyClass
  members: false
```

### Reference Directory

quartodoc's `dir` becomes `reference.output`. Sciris publishes its reference under `api/`:

``` yaml
reference:
  output: api
```

The 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](configuration.md#reference-output).

## 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](custom-sections.md#root-pages) for the full rules.

### Directories of Pages

A directory such as `tutorials/` can stay where it is. List it under [sections](../reference/great_docs.rendering.ReferenceIndexRenderer.sections.md) and it publishes at the same path, with its own sidebar and a navbar item:

``` yaml
sections:
  - title: Tutorials
    dir: tutorials
```

An `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](custom-sections.md). Narrative pages can also go into `user_guide/`, which gives them the User Guide's sidebar and ordering (see [User Guides](user-guides.md)), but nothing requires the move.

### Files at the Site Root

Other files publish only when `site_root.files` lists them. This replaces `project.resources`:

``` yaml
site_root:
  files: [CNAME, api.json]

pre_render: build_api_index.py
```

Both 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](llms-txt.md#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:

``` markdown
{{< include ../CHANGELOG.md >}}
```

See [Includes](authoring-qmd-files.md#includes).

## Navigation and Footer

Great Docs generates the navbar, sidebars and footer, and merges `quarto.website` over them. A Quarto `website` block can therefore move across nearly as written. Links may use source paths relative to `great-docs.yml`, and generated pages use their published paths, such as `api/index.qmd`:

``` yaml
quarto:
  website:
    repo-url: https://github.com/sciris/sciris
    repo-actions: [issue]
    search:
      type: overlay
    navbar:
      collapse-below: lg
      left:
        - {text: Home, href: index.qmd}
        - {text: Overview, href: overview.qmd}
        - {text: Tutorials, href: tutorials/index.qmd}
        - {text: What's new, href: whatsnew.qmd}
        - {text: API reference, href: api/index.qmd}
      right: []
      tools:
        - icon: github
          href: https://github.com/sciris/sciris
    page-footer:
      center: "© 2014-2026 by the Sciris Development Team."
    sidebar:
      - id: reference
        collapse-level: 2
        contents:
          - {text: "**Home**", href: index.qmd}
          - "{{ contents }}"
```

A list replaces the generated list, so this navbar holds only Sciris's items, and the build warns about any generated page, such as the Changelog, that no navbar item or sidebar reaches. Write `"{{ contents }}"` in a list to keep the generated items there. The `reference` sidebar keeps the generated API sections, so it no longer lists each module by hand. The footer text is followed by "Site created with Great Docs" while `attribution` is `true`.

Set the `website` keys that have settings of their own, such as `logo` and `site_url`, through those settings (see the [key mapping](#key-mapping)). A `logo` hides the text title by default, as `title: false` did. `quarto.website` rejects `bread-crumbs` and points at `breadcrumbs`. The `edit` and `source` actions of `repo-actions` open the page's own source file, so `repo-subdir`, if you set it, names the directory with `pyproject.toml` rather than the Quarto project. See [Navigation and Footer](configuration.md#navigation-and-footer) for the merge rules and the pages that show only the `issue` link.

## 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:

``` yaml
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: github
```

Great Docs reads or manages some of these keys; see [Quarto HTML Settings](configuration.md#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](theming.md#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](community-files.md) and [llms.txt](llms-txt.md).

## 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](configuration.md) lists every `great-docs.yml` option
- [API Documentation](api-documentation.md) covers reference sections and member placement
- [Custom Sections](custom-sections.md) covers sections, root pages and site-root files
- [Cross-Referencing](cross-referencing.md) covers links, interlinks and aliases
