aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-04-15 21:39:31 +0300
committerGitHub <noreply@github.com>2022-04-15 21:39:31 +0300
commit8305eaffbc51fccc72183b4fe64f4c9db047fb82 (patch)
tree67ec0b826c50dcfc538f488a2ff759a1cd66120d /docs
parent48b5918c2d465b482de4f070879b5ad93cc248b3 (diff)
downloaddokka-8305eaffbc51fccc72183b4fe64f4c9db047fb82.tar.gz
dokka-8305eaffbc51fccc72183b4fe64f4c9db047fb82.tar.bz2
dokka-8305eaffbc51fccc72183b4fe64f4c9db047fb82.zip
Decompose `base.ftl` template (#2432)
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