Skip to content

Commit e052cb7

Browse files
committed
docs: generator layout entry points
1 parent c6076e9 commit e052cb7

File tree

11 files changed

+11
-13
lines changed

11 files changed

+11
-13
lines changed

docs/modules/ROOT/pages/generators.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ The templates used to generate the documentation are located in the `share/mrdoc
4747
addons: /path/to/custom/addons
4848
----
4949

50-
Each symbol goes through a main layout template in the `share/mrdocs/addons/generator/<generator>/layouts` directory. The multipage generator renders the layout as separate pages for each symbol. The single-page generator renders and concatenates the layout.
50+
Each symbol goes through a main layout template in the `share/mrdocs/addons/generator/<generator>/layouts/single-symbol.<generator>.hbs` directory.
51+
52+
The multipage generator renders the layout multiple times as separate pages for each symbol. The single-page generator renders the layout multiple times and concatenates the results in a single page.
5153

5254
Each time the generator encounters a symbol, it renders the layout template with the symbol data as the Handlebars context. The layout template can include other partial templates to render the symbol data. These partials are available in the `share/mrdocs/addons/generator/<generator>/partials` directory.
5355

share/mrdocs/addons/generator/asciidoc/layouts/overload-set.adoc.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! A page when the symbol type is "overloads" }}
12
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
23
[#{{sectionref}}]
34

share/mrdocs/addons/generator/asciidoc/layouts/page.adoc.hbs

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
{{! The footer for single page documentation }}
12

23
Created with MrDocs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
{{! The header for single page documentation }}
12
= Reference
23
:mrdocs:

share/mrdocs/addons/generator/asciidoc/layouts/single-symbol.adoc.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! The section with a symbol in single page output or the symbol page in multi page output }}
12
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
23
[#{{sectionref}}]
34

share/mrdocs/addons/generator/html/layouts/overload-set.html.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! A page when the symbol type is "overloads" }}
12
{{#if relfileprefix}}<meta name="relfileprefix" content="{{relfileprefix}}">{{/if}}
23
<div id="{{#if (is_multipage)}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}">
34

share/mrdocs/addons/generator/html/layouts/page.html.hbs

Lines changed: 0 additions & 9 deletions
This file was deleted.

share/mrdocs/addons/generator/html/layouts/single-footer.html.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! The footer for single page documentation }}
12
</div>
23
<div><h4>Created with MrDocs</h4></div>
34
</body>

share/mrdocs/addons/generator/html/layouts/single-header.html.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! The header for single page documentation }}
12
</html>
23
<head></head>
34
<body>

0 commit comments

Comments
 (0)