Custom Sections

Great Docs lets you add any number of custom page groups to your documentation site β€” examples, tutorials, demos, or anything else. Each section gets its own navbar link and sidebar navigation. By default, the navbar links directly to the first page in the section. Set index: true to generate a card-based index page instead. For blog-style content, there’s a dedicated type: blog mode that uses Quarto’s native listing directive.

Quick Start

  1. Create a directory in your project root with .qmd files:
my-package/
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ 01-basic-usage.qmd
β”‚   β”œβ”€β”€ 02-advanced.qmd
β”‚   └── 03-real-world.qmd
β”œβ”€β”€ great-docs.yml
└── ...
  1. Add the section to great-docs.yml:
great-docs.yml
sections:
  - title: Examples
    dir: examples
  1. Run great-docs build β€” the Examples link appears in the navbar and the pages are rendered with a sidebar.

Configuration

Each section is defined as an entry in the sections array:

great-docs.yml
sections:
  - title: Examples          # Navbar link text (required)
    dir: examples            # Source directory (required)
    index: true              # Generate card-based index page (optional)
    navbar_after: User Guide  # Insert after this navbar item (optional)
    type: default            # Section type: "default" or "blog" (optional)

Required Fields

Field Description
title The text shown in the navbar link and sidebar heading
dir Path to the source directory (relative to project root)

Optional Fields

Field Default Description
index false When true, auto-generates a card-based index page; when false, navbar links to the first page
navbar_after Before β€œReference” Name of an existing navbar item to place this section after
type default "default" for card-grid index with sidebar; "blog" for Quarto listing page

Multiple Sections

Add as many sections as you need:

great-docs.yml
sections:
  - title: Examples
    dir: examples
  - title: Tutorials
    dir: tutorials
    navbar_after: Examples
  - title: Blog
    dir: blog
    type: blog
    navbar_after: Reference

This produces a navbar like:

Home | User Guide | Examples | Tutorials | Reference | Blog
TipBlog sections

The type: blog option uses Quarto’s native listing directive for date-sorted, searchable blog posts. See Blog for the full guide.

Page Files

Place .qmd or .md files in the section directory. Great Docs will:

  • Strip numeric prefixes from filenames for clean URLs (01-basic.qmd β†’ basic.qmd)
  • Add bread-crumbs: false to frontmatter automatically
  • Copy all files to the build directory

Frontmatter

Each page’s YAML frontmatter is used to populate the auto-generated index and the sidebar:

examples/01-basic-usage.qmd
---
title: "Basic Usage"
description: "A simple example showing core functionality"
image: "img/basic.png"
---
Field Used for
title Sidebar link text, index page heading
description Index page summary text
image Index page thumbnail (optional)

Index Page

No Index (Default)

By default, sections do not get an index page. The navbar links directly to the first page in the section, and all pages are accessible via the sidebar. This is the simplest setup and works well when pages are self-explanatory.

Auto-Generated Index

Set index: true to generate a gallery-style index page with cards for each page, using each file’s title, description, and image from frontmatter:

great-docs.yml
sections:
  - title: Examples
    dir: examples
    index: true

Custom Index

If you provide your own index.qmd in the directory, Great Docs uses it as-is β€” regardless of the index setting. This gives you full control over the landing page layout β€” you can write custom HTML, use Quarto grid layouts, or embed interactive content.

examples/
β”œβ”€β”€ index.qmd          ← Your custom gallery page
β”œβ”€β”€ 01-basic.qmd
β”œβ”€β”€ 02-advanced.qmd
└── img/
    β”œβ”€β”€ basic.png
    └── advanced.png

Subdirectories

Sections support nested subdirectories. Files in subdirectories are copied with their relative paths preserved:

tutorials/
β”œβ”€β”€ getting-started/
β”‚   β”œβ”€β”€ installation.qmd
β”‚   └── first-steps.qmd
└── advanced/
    └── custom-config.qmd

Next Steps

  • Blog covers setting up a blog with Quarto’s listing directive
  • Configuration covers all available great-docs.yml options
  • User Guides covers the User Guide section setup