Skip to content

Commit 0823b48

Browse files
committed
refactor: synchronize HTML templates
1 parent e052cb7 commit 0823b48

File tree

281 files changed

+18550
-3860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+18550
-3860
lines changed

docs/modules/ROOT/pages/generators.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,28 @@ 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/single-symbol.<generator>.hbs` directory.
50+
Each symbol goes through a main layout template in the `share/mrdocs/addons/generator/<generator>/layouts/single-symbol.<generator>.hbs` directory. This template is a simple entry point that renders the partial relative to the symbol kind.
51+
52+
The partials are located in the `share/mrdocs/addons/generator/<generator>/partials` directory. It contains the following subdirectories:
53+
54+
* `symbols`: Contains one partial for each symbol kind. The fields of each symbol object are described in the <<symbol-fields,Symbol Object>> section.
55+
* `signature`: Contains one partial for each symbol kind that renders the signature of the symbol as if declared in {cpp}.
56+
* `types`: partials for rendering other types of objects in a canonical form. Please refer to the <<dom_reference,Document Object Model Reference>> for more information on each type of object.
5157

5258
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.
5359

54-
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.
60+
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.
5561

56-
The Document Object Model (DOM) for each symbol includes all information about the symbol. One advantage of custom templates over post-processing XML files is the ability to access symbols as a graph. If symbol `A` refers to symbol `B`, some properties of symbol `B` are likely to be required in the documentation of `A`. All templates and generators can access a reference to `B` by searching the symbol tree or simply by accessing the elements `A` refers to. All references to other symbols are resolved in the templates.
62+
The Document Object Model (DOM) for each symbol includes all information about the symbol.One advantage of custom templates over post-processing XML files is the ability to access symbols as a graph.If symbol `A` refers to symbol `B`, some properties of symbol `B` are likely to be required in the documentation of `A`.All templates and generators can access a reference to `B` by searching the symbol tree or simply by accessing the elements `A` refers to.All references to other symbols are resolved in the templates.
5763

64+
[#dom_reference]
5865
== Document Object Model Reference
5966

60-
The Document Object Model (DOM) is a tree structure that represents the symbols extracted from the source code. The DOM is used by the generator to render the documentation.
67+
The Document Object Model (DOM) is a tree structure that represents the symbols extracted from the source code.The DOM is used by the generator to render the documentation.
6168

6269
=== Top-Level Fields
6370

64-
The top-level object in the DOM is the context for a template. The top-level object has the following properties:
71+
The top-level object in the DOM is the context for a template.The top-level object has the following properties:
6572

6673
|===
6774
|Property |Type| Description

share/mrdocs/addons/generator/README.adoc

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

share/mrdocs/addons/generator/asciidoc/README.adoc

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
33
[#{{sectionref}}]
44

5-
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}
5+
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}
66

77
{{#if symbol.members.[0]}}
88

share/mrdocs/addons/generator/asciidoc/partials/declarator-before.adoc.hbs

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

share/mrdocs/addons/generator/asciidoc/partials/declarator.adoc.hbs

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

share/mrdocs/addons/generator/asciidoc/partials/info-member.adoc.hbs

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

share/mrdocs/addons/generator/asciidoc/partials/nested-name-specifier.adoc.hbs

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
namespace {{symbol.name}} = {{>name-info symbol.aliasedSymbol}}
1+
namespace {{symbol.name}} = {{>types/name-info symbol.aliasedSymbol}}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{>template-head symbol.template}}
1+
{{>types/template-head symbol.template}}
22

3-
concept {{>declarator-id symbol}} = {{symbol.constraint}}
3+
concept {{>types/declarator-id symbol}} = {{symbol.constraint}}

0 commit comments

Comments
 (0)