Skip to content

Commit 45d05d4

Browse files
committed
docs: rough documentation of subsections
1 parent 5419c63 commit 45d05d4

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

docs/get-started/basic-content.qmd

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,36 @@ quartodoc:
9595
# set the children option, so that methods get documented
9696
# on separate pages. MdRenderer's docs will include a summary
9797
# table that links to each page.
98-
- name: quartodoc.MdRenderer
98+
- name: MdRenderer
9999
children: separate
100100
```
101101

102+
## Reference page sub-sections
103+
104+
quartodoc supports two levels of grouping on the reference page.
105+
Use the `subtitle:` option to add an additional level of grouping.
106+
107+
For example, the code below creates an API reference page with one top-level section ("Some section"),
108+
with two sub-sections inside it.
109+
110+
111+
```yaml
112+
quartodoc:
113+
package: quartodoc
114+
sections:
115+
- title: Some section
116+
117+
- subtitle: Stuff A
118+
desc: This is subsection A
119+
contents:
120+
- MdRenderer
121+
122+
- subtitle: Stuff B
123+
desc: This is subsection B
124+
contents:
125+
- get_object
126+
```
127+
102128
## Grouping on a page
103129

104130
By default, content in each section gets included in the same index table,

docs/get-started/basic-docs.qmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ print(renderer.render(doc_params))
4646

4747
The `sections` field defines which functions to document.
4848

49-
It requires three pieces of configuration:
49+
It commonly requires three pieces of configuration:
5050

5151
* `title`: a title for the section
5252
* `desc`: a description for the section
5353
* `contents`: a list of functions to document
5454

55+
You can also replace `title` with `subtitle` to create a sub-section.

0 commit comments

Comments
 (0)