Docs

2 minutes read

Document a tool using the built-in documentation feature.

To create a documentation page, start with a Zola section. Set the following front matter variable:

page_template = "documentation_page.html"

Then, add pages. Use the sections front matter variable in the section and the section front matter variable in the individual pages to group multiple pages to a docs section.

Options

Section

Use the default Zola section front matter variables to configure the docs. Duckling provides the following additional variable:

Use the following syntax:

[extra]
sections = [
  "Usage",    # Section 1
  "Markdown", # Section 2
  "Advanced"  # Section 3
]

Page

In addition to the default front matter variables for pages, Duckling provides some additional variables that can be set under [extra]:

The following options are available in the [extra.comments] section:

Example

The code for Duckling’s docs can be used as a reference or as a starting point. It is available in the project’s source code.