-
Notifications
You must be signed in to change notification settings - Fork 1
Changing the theme (template) of the documentation
docs_gm
includes one integrated default template called docs_gm-basic
.
You can also change the name of the template to use (the template package must be installed globally). For example, if you have a template named docs_gm-awesome-template
, you can write this in your configuration file:
"template": "awesome-template",
Another alternative is to set the values using the console:
docs_gm generate --template awesome-template
Check the help for the generate
command with docs_gm generate --help
to see all the possible values that can be overwritten in the console.
You can create custom HTML templates and use them with docs_gm. Refer to this page for how to create a custom template.
If you want to download a custom template made by another, simply find the template you want to use (Must be published as an npm package) and install it globally with:
npm install --global docs_gm-my-template-name
Then you can use "template": "my-template-name"
from your docs_gm.json
file, or change it from the console with:
docs_gm generate --template=my-template-name
To use a custom template from a folder locally, create a folder named templates and place all the custom templates folder inside. Example:
- templates
- super-template
- template.json
- another-custom-template
- template.json
- foo-template-name
- template.json
- super-template
Then, change in your docs_gm.json
file, the templatesFolder
path to point to your templates
folder. Remember, if you are on Windows, you must escape the backslash \\
. Example:
"templatesFolder": "C:\\my\\path\\template\\",
Then, you can change the Template name and design name to use your custom template:
"template": "super-template",