Skip to content

Commit f551db3

Browse files
committed
docs: generator DOM reference
1 parent 4393f22 commit f551db3

File tree

4 files changed

+859
-54
lines changed

4 files changed

+859
-54
lines changed

docs/modules/ROOT/nav.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* xref:usage.adoc[Getting Started]
55
* xref:commands.adoc[Documenting the Code]
66
* xref:config-file.adoc[]
7+
* xref:generators.adoc[]
78
* xref:design-notes.adoc[]
89
* xref:contribute.adoc[]
910
* xref:license.adoc[]

docs/modules/ROOT/pages/config-file.adoc

+3-54
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ include::partial$mrdocs-example.yml[]
1111
--------
1212

1313
The xref:usage.adoc[Usage] page provides a detailed explanation of what to combine options from the configuration file and the command line.
14+
1415
The <<config-options-reference>> section provides a detailed explanation of the options available.
1516

17+
More information about the generators can be found in the xref:generators.adoc[Generators] page.
18+
1619
== YAML Schema
1720

1821
To get linting and autocompletion in the config file, a schema for the config can be specified.
@@ -44,60 +47,6 @@ When this file is generated from a `CMakeLists.txt` script, the `cmake` option c
4447
Additionally, the `defines` option can be used to specify preprocessor definitions that should be used when generating the documentation.
4548
These definitions are included in all targets of the compilation database.
4649

47-
== Generators
48-
49-
MrDocs supports multiple output formats that can be specified via the `generate` option:
50-
51-
|===
52-
|Format |Description
53-
54-
|`adoc`
55-
|AsciiDoc format.
56-
57-
|`html`
58-
|HTML format.
59-
60-
|`xml`
61-
|XML format.
62-
|===
63-
64-
* Asciidoc is a text-based format that is easy to read and write.
65-
It can also be converted to other formats such as HTML and Markdown.
66-
67-
* HTML can be generated directly with the `html` format.
68-
69-
* XML is a structured format that can be used in tests or as an intermediary format for other tools.
70-
71-
The `generate` option can be used to specify the output format:
72-
73-
[source,yaml]
74-
----
75-
# ...
76-
generate: adoc
77-
# ...
78-
----
79-
80-
=== Generator Templates
81-
82-
MrDocs attempts to support various alternatives for customizing the output format and style without complex workflows to post-process XML output.
83-
For the Asciidoc and HTML generators, the desired customization can usually be achieved by modifying the templates used to generate the output.
84-
85-
In the root of the installation directory, you will find the `share/mrdocs/addons/generator` directory.
86-
This directory contains the templates used to generate the documentation with the markup formats.
87-
Users can create a copy of these files and provide their own `addons` directory via the `addons` option.
88-
This allows users to customize the output format to their needs.
89-
90-
[source,yaml]
91-
----
92-
addons: /path/to/custom/addons
93-
----
94-
95-
One advantage of custom templates over post-processing XML files is the ability to access symbols as a graph.
96-
If symbol `A` refers to symbol `B`, some properties of symbol `B` are likely to be required in the documentation of `A`.
97-
All templates and generators can access a reference to `B` by searching the symbol tree or simply by accessing the elements `A` refers to.
98-
99-
// === Generator Plugins
100-
10150
== Filters
10251

10352
=== Symbol Filters

0 commit comments

Comments
 (0)