The Docusaurus provider builds documentation adapted for Docusaurus. It uses the Markdown provider as a base, but adds additional metadata and files for Docusaurus.
It does not create a Docusaurus site for you, to do this, follow the official guide
Options for the docusaurus formatter can be provided under formatters.docusaurus
in the configuration file. For full reference, see the example-config.yml.
formatters:
docusaurus:
addPageTags: true
Option | Description |
---|---|
addPageTags |
Add the resource provider as a tag to the page for better navigation using page metadata. |
The following metadata and files are added when you use the Docusaurus prodvider.
The _category_.json
file is created in what the tool considers a provider root folder. This is one level in from the --folderPath
parameter.
This file sets the label for the folder and converts the folder name to a display name. For the example below, key-vault
will become Key Vault
and web
will become Web
.
When passing the path /home/Users/build/reg-modules
as --folderPath
with the following structure:
reg-modules
├── key-vault
│ ├── role-assignments
│ | └── vaults-rbac.bicep
│ └── vaults.bicep
├── web
│ ├── function-app.bicep
│ ├── function-app-dedicated.bicep
│ └── web-app.bicep
└── resource-group.bicep
it considers key-vault
and web
to be the provider folders. This will generate an output structure as:
reg-modules-out
├── key-vault
│ ├── role-assignments
│ | └── vaults-rbac.md
| ├── _category_.json
│ └── vaults.md
├── web
| ├── _category_.json
│ ├── function-app.md
│ ├── function-app-dedicated.md
│ └── web-app.md
└── resource-group.md
In addition to adding the category metadata, some metadata is added to the individual page.
Currently only tags are added to the page. These tags consists of the resource providers used in the template, such as Microsoft.Web/sites
.
This can be disabled by setting addPageTags: false
in the provider configuration.