aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/src/doc/docs/user_guide/base-specific/frontend.md37
1 files changed, 22 insertions, 15 deletions
diff --git a/docs/src/doc/docs/user_guide/base-specific/frontend.md b/docs/src/doc/docs/user_guide/base-specific/frontend.md
index 2a6deac9..0e31aa48 100644
--- a/docs/src/doc/docs/user_guide/base-specific/frontend.md
+++ b/docs/src/doc/docs/user_guide/base-specific/frontend.md
@@ -81,22 +81,29 @@ To customize HTML output, you can use the [default template](https://github.com/
To change page assets, you can set properties `customAssets` and `customStyleSheets`.
Assets are handled by Dokka itself, not FreeMaker.
-Currently, there is only one template file with predefined name `base.ftl`. It defines general design of all pages to render.
-If `templatesDir` is defined, Dokka will find the `base.ftl` file there.
+There is a template file with predefined name `base.ftl`. It defines general design of all pages to render.
+`base.ftl` can import another templates that can be set by user as well:
+* `includes/header.ftl`
+* `includes/footer.ftl`
+* `includes/page_metadata.ftl`
+* `includes/source_set_selector.ftl`.
+
+If `templatesDir` is defined, Dokka will find a template file there.
+If the file is not found, a default one will be used.
Variables given below are available to the template:
- * `${pageName}` - the page name
- * `${footerMessage}` - text that is set by the `footerMessage` property
- * `${sourceSets}` - a nullable list of source sets, only for multi-platform pages. Each source set has `name`, `platfrom` and `filter` properties.
+* `${pageName}` - the page name
+* `${footerMessage}` - text that is set by the `footerMessage` property
+* `${sourceSets}` - a nullable list of source sets, only for multi-platform pages. Each source set has `name`, `platfrom` and `filter` properties.
Also, Dokka-defined [directives](https://freemarker.apache.org/docs/ref_directive_userDefined.html) can be used:
- * `<@content/>` - main content
- * `<@resources/>` - scripts, stylesheets
- * `<@version/>` - version ([versioning-plugin](https://kotlin.github.io/dokka/1.6.20/user_guide/versioning/versioning/) will replace this with a version navigator)
- * `<@template_cmd name="...""> ...</@template_cmd>` - is used for variables that depend on the root project (such `pathToRoot`, `projectName`). They are available only inside the directive. This is processed by a multi-module task that assembles partial outputs from modules.
- Example:
- ```
- <@template_cmd name="projectName">
- <span>${projectName}</span>
- </@template_cmd>
- ``` \ No newline at end of file
+* `<@content/>` - main content
+* `<@resources/>` - scripts, stylesheets
+* `<@version/>` - version ([versioning-plugin](https://kotlin.github.io/dokka/1.6.20/user_guide/versioning/versioning/) will replace this with a version navigator)
+* `<@template_cmd name="...""> ...</@template_cmd>` - is used for variables that depend on the root project (such `pathToRoot`, `projectName`). They are available only inside the directive. This is processed by a multi-module task that assembles partial outputs from modules.
+ Example:
+ ```
+ <@template_cmd name="projectName">
+ <span>${projectName}</span>
+ </@template_cmd>
+ ``` \ No newline at end of file