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
Beyond API reference documentation, you often need narrative documentation: tutorials, guides, and explanations. Great Docs makes this easy with automatic User Guide support.
9
+
API reference pages are valuable, but they only describe individual functions and classes in
10
+
isolation. For users to truly understand your project, they need narrative documentation:
11
+
tutorials that walk them through real tasks, guides that explain concepts in context, and
12
+
explanations that connect the pieces together. Without this kind of content, users are left to
13
+
figure out the bigger picture on their own.
14
+
15
+
Great Docs treats user guides as first-class content. When you add a `user_guide/` directory to
16
+
your project, Great Docs automatically generates sidebar navigation, adds a navbar link, applies
17
+
narrative-optimized styling, and keeps everything in sync across builds. You write Quarto Markdown
18
+
files and Great Docs handles the rest.
10
19
11
20
## Creating a User Guide
12
21
13
-
To add a User Guide to your documentation:
22
+
Getting started takes just three steps:
23
+
24
+
1. create a `user_guide/` directory in your project root
25
+
2. add `.qmd` files for each page
26
+
3. run `great-docs build`
14
27
15
-
1. Create a `user_guide/` directory in your project root
16
-
2. Add `.qmd` files for each page
17
-
3. Run `great-docs build`
28
+
Great Docs automatically:
18
29
19
-
That's it! Great Docs automatically:
30
+
- copies files to `great-docs/user-guide/`
31
+
- generates sidebar navigation
32
+
- adds a "User Guide" link to the navbar
33
+
- organizes pages into sections
20
34
21
-
- Copies files to `great-docs/user-guide/`
22
-
- Generates sidebar navigation
23
-
- Adds a "User Guide" link to the navbar
24
-
- Organizes pages into sections
35
+
No additional configuration is required. As soon as Great Docs finds `.qmd` files in the
36
+
`user_guide/` directory, the User Guide section appears in your site.
25
37
26
38
## Directory Structure
27
39
40
+
A typical project with a User Guide looks like this:
The `user_guide/` directory is the default location. You can use a [custom directory](#custom-user-guide-directory) by setting `user_guide` in `great-docs.yml`.
59
+
The `user_guide/` directory is the default location. You can use a
60
+
[custom directory](#custom-user-guide-directory) by setting `user_guide` in `great-docs.yml`.
46
61
47
62
## Page Ordering
48
63
49
-
Files are sorted alphabetically by filename. Use numeric prefixes to control order:
64
+
The order of pages in the sidebar matters for guiding readers through your content in a logical
65
+
sequence. Files are sorted alphabetically by filename, so numeric prefixes give you full control
66
+
over the ordering:
50
67
51
68
```{.default filename="user_guide/"}
52
69
user_guide/
@@ -56,11 +73,17 @@ user_guide/
56
73
└── 03-advanced.qmd # Fourth
57
74
```
58
75
59
-
The prefix is stripped from the title, so `01-installation.qmd` becomes "Installation" in the navigation.
76
+
The prefix is stripped from the title, so `01-installation.qmd` becomes "Installation" in the
77
+
navigation. This means you can reorder pages at any time by renaming files without affecting how
78
+
titles appear in the sidebar.
60
79
61
80
## Organizing into Sections
62
81
63
-
Group related pages into sections using the `guide-section` frontmatter key:
82
+
As your user guide grows, flat lists of pages become hard to navigate. Sections let you group
83
+
related pages together so readers can find what they need and understand how topics relate to each
84
+
other.
85
+
86
+
The simplest approach is the `guide-section` frontmatter key:
64
87
65
88
```{.yaml filename="01-installation.qmd"}
66
89
---
@@ -83,9 +106,13 @@ User Guide
83
106
└── Customization
84
107
```
85
108
109
+
This grouping is purely visual in the sidebar. The pages themselves remain as flat files in the
110
+
`user_guide/` directory.
111
+
86
112
### Section Order
87
113
88
-
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:
114
+
Sections appear in the order they're first encountered (based on file sort order). To control
115
+
section order, ensure the first file in each section has the appropriate prefix:
89
116
90
117
```{.default filename="user_guide/"}
91
118
user_guide/
@@ -98,7 +125,10 @@ user_guide/
98
125
99
126
### Subdirectory-Based Sections
100
127
101
-
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`):
128
+
For larger user guides, you may prefer organizing pages into actual subdirectories rather than using
129
+
frontmatter. Each
130
+
subdirectory becomes a section in the sidebar, with the section title derived from the
131
+
subdirectory's `index.qmd` title (or the directory name if there is no `index.qmd`):
102
132
103
133
```{.default filename="user_guide/"}
104
134
user_guide/
@@ -126,9 +156,13 @@ User Guide
126
156
└── Deployment
127
157
```
128
158
129
-
A 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.
159
+
A root-level `index.qmd` is recommended so the "User Guide" navbar link has a landing page.
160
+
Subdirectory `index.qmd` files provide section titles but don't appear as separate pages in the
161
+
sidebar. Rather, their title is used as the collapsible section heading.
130
162
131
-
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:
163
+
Subdirectories are sorted alphabetically by directory name. To control the order of sections and
164
+
pages within them, use numeric prefixes. They are stripped from both directory names and filenames
165
+
in URLs and navigation:
132
166
133
167
```{.default filename="user_guide/"}
134
168
user_guide/
@@ -154,15 +188,21 @@ The prefixes control ordering but don't appear in the output:
154
188
155
189
This pattern gives you full control over section and page order while keeping URLs clean.
156
190
157
-
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.
191
+
The subdirectory approach works well for larger user guides where the directory structure itself
192
+
communicates the organization, while `guide-section` frontmatter is better suited for flat file
193
+
layouts.
158
194
159
195
## Writing Pages
160
196
161
-
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.
197
+
User Guide pages are standard Quarto Markdown files, which means you have access to all of Quarto's
198
+
powerful features for creating rich, interactive documentation. Here are some of the most useful
199
+
features for writing guides.
162
200
163
201
### Basic Frontmatter
164
202
165
-
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:
203
+
Every User Guide page needs frontmatter at the top to define its title and section. The `title`
204
+
appears in the sidebar navigation and as the page heading, while `guide-section` determines which
205
+
group the page belongs to:
166
206
167
207
```{.yaml filename="your-page.qmd"}
168
208
---
@@ -173,7 +213,8 @@ guide-section: "Section Name"
173
213
174
214
### Code Blocks
175
215
176
-
Code blocks with syntax highlighting are essential for technical documentation. Specify the language after the opening backticks to enable highlighting:
216
+
Code blocks with syntax highlighting are essential for technical documentation. Specify the language
217
+
after the opening backticks to enable highlighting:
177
218
178
219
````markdown
179
220
```python
@@ -184,19 +225,23 @@ docs.build()
184
225
```
185
226
````
186
227
187
-
Quarto supports syntax highlighting for dozens of languages including Python, JavaScript, TypeScript, R, Bash, YAML, TOML, and many more.
228
+
Quarto supports syntax highlighting for dozens of languages including Python, JavaScript,
229
+
TypeScript, R, Bash, YAML, TOML, and many more.
188
230
189
-
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:
231
+
For Python code that you want to actually execute and show the output, use `{python}` instead of
232
+
just `python`. You can control execution behavior with hash-pipe options at the top of the code
233
+
block. Some useful hash-pipe options include:
190
234
191
-
-`#| echo: false` – Hide the code, show only output
192
-
-`#| eval: false` – Show the code but don't run it
193
-
-`#| output: false` – Run the code but hide output
194
-
-`#| warning: false` – Suppress warning messages
195
-
-`#| fig-cap: "Caption"` – Add a caption to figure output
235
+
-`#| echo: false`: hide the code, show only output
236
+
-`#| eval: false`: show the code but don't run it
237
+
-`#| output: false`: run the code but hide output
238
+
-`#| warning: false`: suppress warning messages
239
+
-`#| fig-cap: "Caption"`: add a caption to figure output
196
240
197
241
### Tabsets
198
242
199
-
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:
243
+
Tabsets let you present alternative content (like code in multiple languages or instructions for
244
+
different platforms) without cluttering the page. Readers can click to switch between tabs:
200
245
201
246
````markdown
202
247
::: {.panel-tabset}
@@ -216,11 +261,13 @@ console.log("Hello");
216
261
:::
217
262
````
218
263
219
-
This is particularly useful for showing installation commands for different operating systems or demonstrating concepts in multiple programming languages.
264
+
This is particularly useful for showing installation commands for different operating systems or
265
+
demonstrating concepts in multiple programming languages.
220
266
221
267
### Callouts
222
268
223
-
Callouts draw attention to important information. Use them sparingly to highlight notes, warnings, or tips that readers shouldn't miss:
269
+
Callouts draw attention to important information. Use them sparingly to highlight notes, warnings,
270
+
or tips that readers shouldn't miss:
224
271
225
272
```markdown
226
273
::: {.callout-note}
@@ -236,11 +283,13 @@ This is a tip.
236
283
:::
237
284
```
238
285
239
-
Each callout type has distinct styling. Notes are informational, warnings alert readers to potential issues, and tips offer helpful suggestions.
286
+
Each callout type has distinct styling. Notes are informational, warnings alert readers to potential
287
+
issues, and tips offer helpful suggestions.
240
288
241
289
### Images
242
290
243
-
Visual content like screenshots, diagrams, and architecture charts can greatly improve documentation. Store images in a subdirectory to keep your User Guide organized:
291
+
Visual content like screenshots, diagrams, and architecture charts can greatly improve
292
+
documentation. Store images in a subdirectory to keep your User Guide organized:
244
293
245
294
```{.default filename="user_guide/"}
246
295
user_guide/
@@ -249,15 +298,17 @@ user_guide/
249
298
└── screenshot.png
250
299
```
251
300
252
-
Reference them in your content using standard Markdown image syntax. The alt text in brackets improves accessibility:
301
+
Reference them in your content using standard Markdown image syntax. The alt text in brackets
302
+
improves accessibility:
253
303
254
304
```markdown
255
305

256
306
```
257
307
258
308
### Cross-References
259
309
260
-
Link freely between pages to help readers navigate related content. For other User Guide pages, use relative paths:
310
+
Link freely between pages to help readers navigate related content. For other User Guide pages, use
311
+
relative paths:
261
312
262
313
```markdown
263
314
See the [Installation](installation.qmd) guide for details.
@@ -273,7 +324,8 @@ These links are validated during the build, so you'll catch broken references ea
273
324
274
325
## Asset Directories
275
326
276
-
Subdirectories that don't contain `.qmd` files are treated as asset directories and copied as-is:
327
+
User guide pages often need supporting files like images, diagrams, or sample data. Any
328
+
subdirectory that doesn't contain `.qmd` files is treated as an asset directory and copied as-is:
277
329
278
330
```{.default filename="user_guide/"}
279
331
user_guide/
@@ -285,29 +337,51 @@ user_guide/
285
337
└── example.json
286
338
```
287
339
340
+
This means you can reference images and other files using simple relative paths (e.g.,
341
+
`images/screenshot.png`) in your `.qmd` files, and Great Docs will make sure those files are
342
+
available in the built site.
343
+
288
344
## User Guide Styling
289
345
290
-
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.
346
+
Because user guides serve a different purpose than API references, Great Docs applies different
347
+
styling to match. The sidebar filter that helps navigate large API listings is hidden since user
348
+
guides are typically smaller and have a clear hierarchical structure. Breadcrumb navigation is also
349
+
removed to provide a cleaner reading experience. The sidebar itself uses section-based navigation
350
+
that mirrors your `guide-section` organization, making it easy for readers to see where they are
351
+
in the guide.
352
+
353
+
These styling differences are applied automatically. You don't need to configure anything to get
354
+
the narrative-optimized layout.
291
355
292
356
## Example: This User Guide
293
357
294
-
The Great Docs User Guide you're reading uses this exact structure:
358
+
The User Guide you're reading right now is built with Great Docs, using the same features described
359
+
on this page. Here's a representative sample of its structure:
295
360
296
-
```
361
+
```{.default filename="user_guide/"}
297
362
user_guide/
298
-
├── 00-introduction.qmd # Getting Started
299
-
├── 01-installation.qmd # Getting Started
300
-
├── 02-quickstart.qmd # Getting Started
301
-
├── 03-configuration.qmd # Core Concepts
302
-
├── 04-api-documentation.qmd # Core Concepts
303
-
├── 05-cli-documentation.qmd # Core Concepts
304
-
├── 06-user-guides.qmd # Core Concepts
305
-
└── 07-deployment.qmd # Deployment
363
+
├── 00-introduction.qmd # Getting Started
364
+
├── 01-installation.qmd # Getting Started
365
+
├── 02-quickstart.qmd # Getting Started
366
+
├── 03-authoring-qmd-files.qmd # Getting Started
367
+
├── 04-writing-docstrings.qmd # Getting Started
368
+
├── 05-configuration.qmd # Config & Theming
369
+
├── 06-api-documentation.qmd # Site Content
370
+
├── 07-cli-documentation.qmd # Site Content
371
+
├── 08-user-guides.qmd # Site Content (this page)
372
+
├── ... # 26 more pages
373
+
└── 35-keyboard-keys.qmd # Site Content
306
374
```
307
375
376
+
The guide spans 36 pages organized across five sections: Getting Started, Config & Theming, Site
377
+
Content, Build & Deploy, and Quality & Maintenance. Numeric prefixes control page order, and
378
+
`guide-section` frontmatter handles the grouping.
379
+
308
380
## Custom User Guide Directory
309
381
310
-
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`:
382
+
By default, Great Docs looks for a `user_guide/` directory in your project root. If you need your
383
+
User Guide source files in a different location (e.g., inside a `docs/` folder or a monorepo
384
+
subdirectory), you can specify a custom path in `great-docs.yml`:
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:
398
+
If both a `user_guide` config option **and** a conventional `user_guide/` directory exist, the
399
+
config option takes precedence and the `user_guide/` directory is ignored. Great Docs will print a
400
+
warning to let you know:
325
401
326
402
```
327
-
⚠️ Both 'user_guide' config option ('docs/guides') and 'user_guide/' directory exist; using configured path
403
+
⚠️ Both 'user_guide' config option ('docs/guides') and 'user_guide/' directory exist; using
404
+
configured path
328
405
```
329
406
330
407
### Warnings
@@ -339,9 +416,12 @@ In all three cases, the User Guide is skipped and processing continues normally.
339
416
340
417
## Tips
341
418
419
+
These tips cover common patterns and best practices for maintaining user guides as they grow.
420
+
342
421
### Keep Source Separate from Output
343
422
344
-
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.
423
+
Whether you use the default `user_guide/` directory or a custom path, Great Docs copies files to
424
+
`great-docs/user-guide/` during each build, keeping your source separate from generated output.
345
425
346
426
### Use Descriptive Titles
347
427
@@ -356,10 +436,23 @@ guide-section: "Reference"
356
436
357
437
### Organize Logically
358
438
359
-
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.
439
+
Group related content into sections that make sense for your users. A common pattern starts with
440
+
"Getting Started" content that covers installation and quick start guides. This is everything new
441
+
users need to get up and running. "Core Concepts" sections explain the main features and typical
442
+
usage patterns. "Advanced" sections dive into complex topics and customization options for power
443
+
users. Finally, a "Reference" section can house configuration options and troubleshooting guides.
444
+
Adapt this structure to fit your project's needs.
360
445
361
446
## Next Steps
362
447
363
-
User guides give your documentation 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.
364
-
365
-
-[Deployment](deployment.qmd) covers publishing your documentation to GitHub Pages
448
+
User guides bring the narrative depth that API references alone can't provide. With numbered files,
449
+
frontmatter sections, and automatic sidebar generation, you can build a structured guide that
450
+
grows alongside your project.
451
+
452
+
-[Custom Sections](custom-sections.qmd) explains how to add entirely new sidebar sections beyond
453
+
the User Guide and API reference
454
+
-[Cross-Referencing](cross-referencing.qmd) covers linking between User Guide pages and API
455
+
reference pages
456
+
-[Theming](theming.qmd) lets you customize the look and feel of your entire site, including User
457
+
Guide pages
458
+
-[Deployment](deployment.qmd) covers publishing your finished documentation to GitHub Pages
0 commit comments