Skip to content

Commit

Permalink
Refactor and remove article.ftl
Browse files Browse the repository at this point in the history
  • Loading branch information
vmishenev committed Apr 14, 2022
1 parent 399e3e6 commit aeaf9e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
7 changes: 6 additions & 1 deletion docs/src/doc/docs/user_guide/base-specific/frontend.md
Expand Up @@ -82,7 +82,12 @@ To customize HTML output, you can use the [default template](https://github.com/
Assets are handled by Dokka itself, not FreeMaker.

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.
`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.

Expand Down
7 changes: 3 additions & 4 deletions plugins/base/src/main/resources/dokka/templates/base.ftl
@@ -1,12 +1,11 @@
<#import "includes/page_heads.ftl" as page_heads>
<#import "includes/page_metadata.ftl" as page_metadata>
<#import "includes/header.ftl" as header>
<#import "includes/footer.ftl" as footer>
<#import "includes/article.ftl" as article>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<@page_heads.display/>
<@page_metadata.display/>
<@template_cmd name="pathToRoot">
<script>var pathToRoot = "${pathToRoot}";</script>
</@template_cmd>
Expand All @@ -28,7 +27,7 @@ if(savedDarkMode === true){
<div id="sideMenu"></div>
</div>
<div id="main">
<@article.display/>
<@content/>
<@footer.display/>
</div>
</div>
Expand Down

This file was deleted.

0 comments on commit aeaf9e9

Please sign in to comment.