User Guides
API reference pages are valuable, but they only describe individual functions and classes in isolation. For users to truly understand your project, they need narrative documentation: tutorials that walk them through real tasks, guides that explain concepts in context, and explanations that connect the pieces together. Without this kind of content, users are left to figure out the bigger picture on their own.
Great Docs treats user guides as first-class content. When you add a user_guide/ directory to your project, Great Docs automatically generates sidebar navigation, adds a navbar link, applies narrative-optimized styling, and keeps everything in sync across builds. You write Quarto Markdown files and Great Docs handles the rest.
Creating a User Guide
Getting started takes just three steps:
- create a
user_guide/directory in your project root - add
.qmdfiles for each page - run
great-docs build
Great Docs automatically:
- copies files to
great-docs/user-guide/ - generates sidebar navigation
- adds a βUser Guideβ link to the navbar
- organizes pages into sections
No additional configuration is required. As soon as Great Docs finds .qmd files in the user_guide/ directory, the User Guide section appears in your site.
Directory Structure
A typical project with a User Guide looks like this:
Project structure
your-project/
βββ great-docs/ # Build directory (ephemeral, gitignored)
β βββ user-guide/ # Copied from user_guide/
β βββ ...
βββ user_guide/ # Your source files (committed to git)
β βββ 00-introduction.qmd
β βββ 01-installation.qmd
β βββ 02-quickstart.qmd
β βββ 03-configuration.qmd
β βββ images/ # Asset directories are copied too
β βββ screenshot.png
βββ great-docs.yml
βββ pyproject.toml
βββ your_package/The user_guide/ directory is the default location. You can use a custom directory by setting user_guide in great-docs.yml.
Page Ordering
The order of pages in the sidebar matters for guiding readers through your content in a logical sequence. Files are sorted alphabetically by filename, so numeric prefixes give you full control over the ordering:
user_guide/
user_guide/
βββ 00-introduction.qmd # First
βββ 01-installation.qmd # Second
βββ 02-getting-started.qmd # Third
βββ 03-advanced.qmd # FourthThe prefix is stripped from the title, so 01-installation.qmd becomes βInstallationβ in the navigation. This means you can reorder pages at any time by renaming files without affecting how titles appear in the sidebar.
Organizing into Sections
As your user guide grows, flat lists of pages become hard to navigate. Sections let you group related pages together so readers can find what they need and understand how topics relate to each other.
The simplest approach is the guide-section frontmatter key:
01-installation.qmd
---
title: "Installation"
guide-section: "Getting Started"
---Pages with the same guide-section value are grouped together in the sidebar:
Sidebar navigation
User Guide
βββ Getting Started
β βββ Introduction
β βββ Installation
βββ Core Concepts
β βββ Configuration
β βββ API Documentation
βββ Advanced
βββ CustomizationThis grouping is purely visual in the sidebar. The pages themselves remain as flat files in the user_guide/ directory.
Section Order
Sections appear in the order theyβre first encountered (based on file sort order). To control section order, ensure the first file in each section has the appropriate prefix:
user_guide/
user_guide/
βββ 00-introduction.qmd # guide-section: "Getting Started"
βββ 01-installation.qmd # guide-section: "Getting Started"
βββ 10-configuration.qmd # guide-section: "Core Concepts"
βββ 11-api-docs.qmd # guide-section: "Core Concepts"
βββ 20-customization.qmd # guide-section: "Advanced"Subdirectory-Based Sections
For larger user guides, you may prefer organizing pages into actual subdirectories rather than using frontmatter. Each subdirectory becomes a section in the sidebar, with the section title derived from the subdirectoryβs index.qmd title (or the directory name if there is no index.qmd):
user_guide/
user_guide/
βββ index.qmd # Root page (appears first in sidebar)
βββ getting-started/
β βββ index.qmd # Section title: "Getting Started"
β βββ installation.qmd
β βββ quickstart.qmd
βββ advanced/
βββ index.qmd # Section title: "Advanced Usage"
βββ configuration.qmd
βββ deployment.qmdThis produces a sidebar like:
Sidebar navigation
User Guide
βββ User Guide # Root index.qmd
βββ Getting Started
β βββ Installation
β βββ Quickstart
βββ Advanced Usage
βββ Configuration
βββ DeploymentA root-level index.qmd is recommended so the βUser Guideβ navbar link has a landing page. Subdirectory index.qmd files provide section titles but donβt appear as separate pages in the sidebar. Rather, their title is used as the collapsible section heading.
Subdirectories are sorted alphabetically by directory name. To control the order of sections and pages within them, use numeric prefixes. They are stripped from both directory names and filenames in URLs and navigation:
user_guide/
user_guide/
βββ index.qmd
βββ 01-getting-started/
β βββ index.qmd # Section title: "Getting Started"
β βββ 01-installation.qmd
β βββ 02-quickstart.qmd
βββ 02-guides/
β βββ index.qmd # Section title: "Guides"
β βββ 01-configuration.qmd
β βββ 02-troubleshooting.qmd
βββ 03-advanced/
βββ index.qmd # Section title: "Advanced"
βββ 01-deployment.qmdThe prefixes control ordering but donβt appear in the output:
01-getting-started/βgetting-started/in URLs01-installation.qmdβinstallation.htmlin rendered pages- Numbering restarts at
01-in each subdirectory
This pattern gives you full control over section and page order while keeping URLs clean.
The subdirectory approach works well for larger user guides where the directory structure itself communicates the organization, while guide-section frontmatter is better suited for flat file layouts.
Writing Pages
User Guide pages are standard Quarto Markdown files, which means you have access to all of Quartoβs powerful features for creating rich, interactive documentation. Here are some of the most useful features for writing guides.
Basic Frontmatter
Every User Guide page needs frontmatter at the top to define its title and section. The title appears in the sidebar navigation and as the page heading, while guide-section determines which group the page belongs to:
your-page.qmd
---
title: "Your Page Title"
guide-section: "Section Name"
---Code Blocks
Code blocks with syntax highlighting are essential for technical documentation. Specify the language after the opening backticks to enable highlighting:
```python
from great_docs import GreatDocs
docs = GreatDocs()
docs.build()
```Quarto supports syntax highlighting for dozens of languages including Python, JavaScript, TypeScript, R, Bash, YAML, TOML, and many more.
For Python code that you want to actually execute and show the output, use {python} instead of just python. You can control execution behavior with hash-pipe options at the top of the code block. Some useful hash-pipe options include:
#| echo: false: hide the code, show only output#| eval: false: show the code but donβt run it#| output: false: run the code but hide output#| warning: false: suppress warning messages#| fig-cap: "Caption": add a caption to figure output
Tabsets
Tabsets let you present alternative content (like code in multiple languages or instructions for different platforms) without cluttering the page. Readers can click to switch between tabs:
::: {.panel-tabset}
## Python
```python
print("Hello")
```
## JavaScript
```javascript
console.log("Hello");
```
:::This is particularly useful for showing installation commands for different operating systems or demonstrating concepts in multiple programming languages.
Callouts
Callouts draw attention to important information. Use them sparingly to highlight notes, warnings, or tips that readers shouldnβt miss:
::: {.callout-note}
This is a note.
:::
::: {.callout-warning}
This is a warning.
:::
::: {.callout-tip}
This is a tip.
:::Each callout type has distinct styling. Notes are informational, warnings alert readers to potential issues, and tips offer helpful suggestions.
Images
Visual content like screenshots, diagrams, and architecture charts can greatly improve documentation. Store images in a subdirectory to keep your User Guide organized:
user_guide/
user_guide/
βββ 01-getting-started.qmd
βββ images/
βββ screenshot.pngReference them in your content using standard Markdown image syntax. The alt text in brackets improves accessibility:
Cross-References
Link freely between pages to help readers navigate related content. For other User Guide pages, use relative paths:
See the [Installation](installation.qmd) guide for details.To link to API reference pages, use a relative path that goes up one directory level first:
See the [GreatDocs](../reference/GreatDocs.qmd) class for the full API.These links are validated during the build, so youβll catch broken references early.
Asset Directories
User guide pages often need supporting files like images, diagrams, or sample data. Any subdirectory that doesnβt contain .qmd files is treated as an asset directory and copied as-is:
user_guide/
user_guide/
βββ 01-guide.qmd
βββ images/ # Copied to great-docs/user-guide/images/
β βββ logo.png
β βββ diagram.svg
βββ data/ # Copied to great-docs/user-guide/data/
βββ example.jsonThis means you can reference images and other files using simple relative paths (e.g., images/screenshot.png) in your .qmd files, and Great Docs will make sure those files are available in the built site.
User Guide Styling
Because user guides serve a different purpose than API references, Great Docs applies different styling to match. The sidebar filter that helps navigate large API listings is hidden since user guides are typically smaller and have a clear hierarchical structure. Breadcrumb navigation is also removed to provide a cleaner reading experience. The sidebar itself uses section-based navigation that mirrors your guide-section organization, making it easy for readers to see where they are in the guide.
These styling differences are applied automatically. You donβt need to configure anything to get the narrative-optimized layout.
Example: This User Guide
The User Guide youβre reading right now is built with Great Docs, using the same features described on this page. Hereβs a representative sample of its structure:
user_guide/
user_guide/
βββ 00-introduction.qmd # Getting Started
βββ 01-installation.qmd # Getting Started
βββ 02-quickstart.qmd # Getting Started
βββ 03-authoring-qmd-files.qmd # Getting Started
βββ 04-writing-docstrings.qmd # Getting Started
βββ 05-configuration.qmd # Config & Theming
βββ 06-api-documentation.qmd # Site Content
βββ 07-cli-documentation.qmd # Site Content
βββ 08-user-guides.qmd # Site Content (this page)
βββ ... # 26 more pages
βββ 35-keyboard-keys.qmd # Site ContentThe guide spans 36 pages organized across five sections: Getting Started, Config & Theming, Site Content, Build & Deploy, and Quality & Maintenance. Numeric prefixes control page order, and guide-section frontmatter handles the grouping.
Custom User Guide Directory
By default, Great Docs looks for a user_guide/ directory in your project root. If you need your User Guide source files in a different location (e.g., inside a docs/ folder or a monorepo subdirectory), you can specify a custom path in great-docs.yml:
great-docs.yml
user_guide: docs/guidesThe path is relative to the project root. Any directory structure works, including nested paths:
great-docs.yml
user_guide: content/user-docsPrecedence Rules
If both a user_guide config option and a conventional user_guide/ directory exist, the config option takes precedence and the user_guide/ directory is ignored. Great Docs will print a warning to let you know:
β οΈ Both 'user_guide' config option ('docs/guides') and 'user_guide/' directory exist; using
configured path
Warnings
Great Docs warns you if the resolved directory:
- Doesnβt exist: the path specified in
user_guidecouldnβt be found - Is empty: the directory exists but contains no files at all
- Has no
.qmdfiles: the directory exists but doesnβt contain any Quarto Markdown files
In all three cases, the User Guide is skipped and processing continues normally.
Tips
These tips cover common patterns and best practices for maintaining user guides as they grow.
Keep Source Separate from Output
Whether you use the default user_guide/ directory or a custom path, Great Docs copies files to great-docs/user-guide/ during each build, keeping your source separate from generated output.
Use Descriptive Titles
The title in frontmatter appears in navigation. Make it clear and concise:
---
title: "Configuration Options" # Good
guide-section: "Reference"
---Organize Logically
Group related content into sections that make sense for your users. A common pattern starts with βGetting Startedβ content that covers installation and quick start guides. This is everything new users need to get up and running. βCore Conceptsβ sections explain the main features and typical usage patterns. βAdvancedβ sections dive into complex topics and customization options for power users. Finally, a βReferenceβ section can house configuration options and troubleshooting guides. Adapt this structure to fit your projectβs needs.
Next Steps
User guides bring the narrative depth that API references alone canβt provide. With numbered files, frontmatter sections, and automatic sidebar generation, you can build a structured guide that grows alongside your project.
- Custom Sections explains how to add entirely new sidebar sections beyond the User Guide and API reference
- Cross-Referencing covers linking between User Guide pages and API reference pages
- Theming lets you customize the look and feel of your entire site, including User Guide pages
- Deployment covers publishing your finished documentation to GitHub Pages