User Guides
Beyond API reference documentation, you often need narrative documentation: tutorials, guides, and explanations. Great Docs makes this easy with automatic User Guide support.
Creating a User Guide
To add a User Guide to your documentation:
- Create a
user_guide/directory in your project root - Add
.qmdfiles for each page - Run
great-docs build
Thatβs it! 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
Directory Structure
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
Files are sorted alphabetically by filename. Use numeric prefixes to control order:
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.
Organizing into Sections
Group related pages into sections using 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
βββ CustomizationSection 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
As an alternative to guide-section frontmatter, you can organize pages into subdirectories. 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
Subdirectories that donβt contain .qmd files are treated as asset directories 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.jsonUser Guide Styling
Great Docs applies different styling to User Guide pages compared to API reference pages, optimizing for the narrative documentation experience. The sidebar filter that helps navigate large APIs 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 documentation.
Example: This User Guide
The Great Docs User Guide youβre reading uses this exact structure:
user_guide/
βββ 00-introduction.qmd # Getting Started
βββ 01-installation.qmd # Getting Started
βββ 02-quickstart.qmd # Getting Started
βββ 03-configuration.qmd # Core Concepts
βββ 04-api-documentation.qmd # Core Concepts
βββ 05-cli-documentation.qmd # Core Concepts
βββ 06-user-guides.qmd # Core Concepts
βββ 07-deployment.qmd # Deployment
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
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
- Deployment covers publishing your documentation to GitHub Pages