You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either way, the rendered output reflects the current state of your package. You never need to manually edit generated reference pages.
525
525
526
+
## Migrating from quartodoc
527
+
528
+
If you have an existing site built with [quartodoc](https://machow.github.io/quartodoc/), switching to Great Docs is straightforward. The two tools share similar ideas (sections, contents lists, Quarto rendering) but differ in where configuration lives and how much you need to specify by hand.
529
+
530
+
### Key Differences
531
+
532
+
||**quartodoc**|**Great Docs**|
533
+
| --- | --- | --- |
534
+
| Config file |`_quarto.yml` (under a `quartodoc:` key) |`great-docs.yml`|
535
+
| API discovery | Manual: you list every object | Automatic: discovers your public API from source |
536
+
| Build command |`quartodoc build` then `quarto render`|`great-docs build` (handles both steps) |
| Generated output |`reference/` directory with `.qmd` files and `_sidebar.yml`|`great-docs/` directory (ephemeral, gitignored) |
539
+
| Sidebar | You include a generated `_sidebar.yml` via `metadata-files`| Managed automatically |
540
+
541
+
### Step-by-Step Migration
542
+
543
+
1.**Install Great Docs** and run `great-docs init` in your project root. This auto-discovers your
544
+
package and creates `great-docs.yml`.
545
+
546
+
2.**Translate your reference layout.** The `sections` structure maps almost directly. A quartodoc
547
+
config like this:
548
+
549
+
```{.yaml filename="_quarto.yml (quartodoc)"}
550
+
quartodoc:
551
+
package: my_package
552
+
sections:
553
+
- title: Core
554
+
desc: Primary interface
555
+
contents:
556
+
- MyClass
557
+
- helper_function
558
+
- title: Utilities
559
+
desc: Utility helpers
560
+
contents:
561
+
- format_output
562
+
```
563
+
564
+
becomes this in Great Docs:
565
+
566
+
```{.yaml filename="great-docs.yml"}
567
+
reference:
568
+
sections:
569
+
- title: Core
570
+
desc: Primary interface
571
+
contents:
572
+
- MyClass
573
+
- helper_function
574
+
- title: Utilities
575
+
desc: Utility helpers
576
+
contents:
577
+
- format_output
578
+
```
579
+
580
+
The section structure (`title`, `desc`, `contents`) is the same and you just move it from
581
+
`quartodoc.sections` in `_quarto.yml` to `reference.sections` in `great-docs.yml`.
582
+
583
+
One syntax difference: quartodoc uses `members: []` (an empty list) to suppress inline method
584
+
documentation on a class, while Great Docs uses `members: false`. So a quartodoc entry like:
585
+
586
+
```yaml
587
+
- name: MyClass
588
+
members: []
589
+
```
590
+
591
+
becomes:
592
+
593
+
```yaml
594
+
- name: MyClass
595
+
members: false
596
+
```
597
+
598
+
3. **Move your user guide pages.** If you have narrative `.qmd` files (tutorials, guides, etc.),
599
+
move them into a top-level `user_guide/` directory. Great Docs expects user guide content there
600
+
rather than scattered alongside `_quarto.yml`. See [User Guides](user-guides.qmd) for naming
601
+
conventions and sidebar ordering.
602
+
603
+
4. **Remove quartodoc artifacts.** Delete the `reference/` directory, the `quartodoc:` block from
604
+
`_quarto.yml`, and the `metadata-files` / `css` entries that pointed to quartodoc's generated
605
+
sidebar and styles. Great Docs manages `_quarto.yml` itself, so you should not maintain one by
606
+
hand.
607
+
608
+
5. **Build and preview.** Run `great-docs build` followed by `great-docs preview`. Your reference
609
+
pages should render with the same content, now with Great Docs' enhanced styling and features.
610
+
611
+
### What You Get for Free
612
+
613
+
After migrating, you gain several capabilities without additional configuration:
614
+
615
+
- **Automatic API discovery**: new exports appear in the docs without editing config files
616
+
- **Smart method splitting**: large classes are automatically split into per-method pages
617
+
- **Type badges**: colored labels indicating whether an item is a class, function, constant, etc.
618
+
- **Sidebar filter**: instant search over the reference sidebar for large APIs
619
+
- **Source links**: clickable links to the exact source lines on GitHub
620
+
- **Sphinx/RST cleanup**: Sphinx cross-reference roles and RST directives render as styled callouts
621
+
- **Cross-referencing**: automatic linking between API pages and from prose to API symbols
622
+
623
+
### Keeping a Custom Layout
624
+
625
+
If you had a carefully curated section structure in quartodoc, you can preserve it exactly by using
626
+
the `reference` config. Great Docs won't override your explicit layout as it only auto-generates
627
+
sections when no `reference` config is present. Your existing organizational choices (domain-based
628
+
grouping, custom ordering, hand-picked method pages) carry over unchanged.
629
+
526
630
## Next Steps
527
631
528
632
Great Docs handles the tedious parts of API documentation (discovery, classification, layout, linking) so you can focus on writing clear docstrings. Whether your package exports a handful of functions or hundreds of classes, the reference section stays organized and up to date.
0 commit comments