Skip to content

Commit 02d81dc

Browse files
committed
docs: exposition uses "Mr.Docs"
1 parent acf7c10 commit 02d81dc

File tree

17 files changed

+82
-78
lines changed

17 files changed

+82
-78
lines changed

docs/antora-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# npm install
22
# npx antora --fetch antora-playbook.yml
33
site:
4-
title: MrDocs
4+
title: Mr.Docs
55
url: https://www.mrdocs.com/
66
start_page: mrdocs::index.adoc
77
robots: allow

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: mrdocs
2-
title: MrDocs
2+
title: Mr.Docs
33
# use the git refname (branch or tag name) in which the component
44
# version descriptor is stored as the version
55
version: true

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= The Configuration File
22

3-
MrDocs uses a configuration file to control how the documentation is generated.
3+
Mr.Docs uses a configuration file to control how the documentation is generated.
44
The file is used to specify options such as the generator to use, additional compilation options, and filters.
55

66
Here's an example of a configuration file:
@@ -36,7 +36,7 @@ include::partial$mrdocs-schema-example.yml[]
3636

3737
== Build Options
3838

39-
A number of options can be used to specify with which compile options MrDocs should be run.
39+
A number of options can be used to specify with which compile options Mr.Docs should be run.
4040

4141
[source,yaml]
4242
----
@@ -55,7 +55,7 @@ These definitions are included in all targets of the compilation database.
5555
== Filters
5656

5757
Not all symbols in a project may be relevant to the documentation.
58-
MrDocs provides a way to filter out symbols based on their location and names.
58+
Mr.Docs provides a way to filter out symbols based on their location and names.
5959

6060
=== File Filters
6161

docs/modules/ROOT/pages/contribute.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
= Contributor's Guide
22

3-
This page contains information for contributors to the MrDocs project.
3+
This page contains information for contributors to the Mr.Docs project.
44
It is intended to provide an overview of the codebase and the process of adding new features.
55

66
== Codebase Overview
77

8-
The MrDocs codebase is divided into several modules:
8+
The Mr.Docs codebase is divided into several modules:
99

1010
include::partial$workflow.adoc[]
1111

12-
This section provides an overview of each module and how they interact with each other in the MrDocs codebase.
12+
This section provides an overview of each module and how they interact with each other in the Mr.Docs codebase.
1313

1414
[#options]
1515
=== Parsing options
1616

17-
MrDocs options affect the behavior of the compilation database, how symbols are extracted, and how the documentation is generated.
17+
Mr.Docs options affect the behavior of the compilation database, how symbols are extracted, and how the documentation is generated.
1818
They are parsed from the command line and configuration file.
1919

20-
The main entry point of MrDocs is the `DoGenerateAction` function in `src/tool/GenerateAction.cpp`.
20+
The main entry point of Mr.Docs is the `DoGenerateAction` function in `src/tool/GenerateAction.cpp`.
2121
It loads the options, creates the compilation database, and runs the extraction and generation steps.
2222
The options are formed from a combination of command line arguments and configuration file settings.
2323

@@ -34,7 +34,7 @@ It also provides a representation plugins can use to access public options from
3434

3535
The function `clang::mrdocs::loadConfig` is also provided to parse all public options from a YAML configuration file.
3636

37-
Internally, MrDocs uses the derived `clang::mrdocs::ConfigImpl` class (`src/lib/Lib/ConfigImpl.hpp`) to also store the private representation of parsed options, such as filters.
37+
Internally, Mr.Docs uses the derived `clang::mrdocs::ConfigImpl` class (`src/lib/Lib/ConfigImpl.hpp`) to also store the private representation of parsed options, such as filters.
3838

3939
==== Finalizing Options
4040

@@ -56,9 +56,9 @@ The AST information is extracted and stored in a `Corpus` object (`mrdocs/Corpus
5656
==== Compilation Database
5757

5858
The second step in `DoGenerateAction` is to create a `CompilationDatabase` object, so we can extract symbols from its source files.
59-
There are multiple possible sources for this file according to the configuration options: the file might be read directly from the path specified in the options, or it might be generated by MrDocs from build scripts.
59+
There are multiple possible sources for this file according to the configuration options: the file might be read directly from the path specified in the options, or it might be generated by Mr.Docs from build scripts.
6060

61-
Whatever the source, a derived `MrDocsCompilationDatabase` object (`lib/Lib/MrDocsCompilationDatabase.hpp`) is created to represent the compilation database.
61+
Whatever the source, a derived `Mr.DocsCompilationDatabase` object (`lib/Lib/Mr.DocsCompilationDatabase.hpp`) is created to represent the compilation database.
6262
The difference between the original `CompilationDatabase` and the `MrDocsCompilationDatabase` is that the latter includes a number of pre-processing steps to filter and transform compilation commands.
6363

6464
For each compilation command:

docs/modules/ROOT/pages/demos.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Demos
22

3-
A few examples of reference documentation generated with MrDocs are available in https://mrdocs.com/demos/:
3+
A few examples of reference documentation generated with Mr.Docs are available in https://mrdocs.com/demos/:
44

55
mrdocs-demos::[]
66

docs/modules/ROOT/pages/design-notes.adoc

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
== Why automate documentation?
44

55
{cpp} API design is challenging.
6-
When you write a function signature, or declare a class, it is at that moment when you are likely to have as much information as you will ever have about what it is supposed to do.
6+
When you write a function signature or declare a class, it is at that moment that you are likely to have as much information as you will ever have about what it is supposed to do.
77
The more time passes before you write the documentation, the less likely you are to remember all the details of what motivated the API in the first place.
88

99
In other words, because best and worst engineers are naturally lazy, the *temporal adjacency* of the {cpp} declaration to the documentation improves outcomes.
@@ -17,11 +17,11 @@ In summary, the automated extraction of reference documentation from {cpp} decla
1717
* And causally connected documentation is more accurate
1818

1919
From the perspective of engineers, however, the biggest advantage of automated documentation is that it implies a single source of truth for the API at a low cost.
20-
However, {cpp} codebases are notoriously difficult to document automatically because of constructs where the code needs to diverge from the intended API that represents the contract with the user.
20+
However, {cpp} codebases are notoriously challenging to document automatically because of constructs where the code needs to diverge from the intended API that represents the contract with the user.
2121

22-
Tools like Doxygen typically require workarounds and manual intervention via preprocessor macros to get the documentation right.
23-
These workarounds are problematic because they effectively mean that there are two versions of the code: the well-formed and the ill-formed versions.
24-
This subverts the single sources of truth for the code.
22+
Tools like Doxygen typically require workarounds and manual intervention via preprocessor macros to produce accurate documentation.
23+
These workarounds are problematic because they result in two versions of the code: the well-formed and the ill-formed versions.
24+
This subverts the single source of truth for the code.
2525

2626
|===
2727
| | Mr. Docs | Automatic | Manual | No Reference
@@ -38,35 +38,39 @@ This is a problem because header files are not always the best source of truth f
3838
Developers familiar with https://cppreference.com[cppreference.com,window=_blank] will know that the documentation there is often more informative than the header files.
3939
* A common alternative is to provide a manual reference to the API.
4040
Developers duplicate the signatures, which requires extra work.
41-
This strategy tends to work well for small libraries and allows the developer to directly express the contract with the user.
41+
This strategy tends to work well for small libraries and allows the developer to express the contract with the user directly.
4242
However, as the single source of truth is lost, it becomes unmanageable as the codebase grows.
4343
When the declaration changes, they forget to edit the docs, and the reference becomes out of date.
4444
* In this case, it looks like the best solution is to automate the documentation.
4545
The causal connection between the declaration and the generated documentation improves outcomes.
46-
That's when developers face difficulties with existing tools like Doxygen, which require workarounds and manual intervention to get the documentation right.
46+
That's when developers face difficulties with existing tools like Doxygen, which require workarounds and manual intervention to produce accurate documentation.
4747
The workarounds mean that there are two versions of the code: the well-formed and the ill-formed versions.
48-
* The philosophy behind MrDocs is to provide solutions to these workarounds so that the single source of truth can be maintained with minimal effort by developers.
48+
* The philosophy behind Mr.Docs is to provide solutions to these workarounds so that the single source of truth can be maintained with minimal effort by developers.
4949
With Mr.Docs, the documented {cpp} code should be the same as the code that is compiled.
5050

5151
== Customization
5252

5353
Once the documentation is extracted from the code, it is necessary to format it in a way that is useful to the user.
54-
This usually involves generating output files that match the content of the documentation to the user's needs.
54+
This usually involves generating output files that match the documentation's content to the user's needs.
5555

5656
A limitation of existing tools like Doxygen is that their output formats are not very customizable.
5757
It supports minor customization in the output style and, for custom content formats, it requires much more complex workflows, like generating XML files and writing secondary applications to process them.
5858

59-
MrDocs attempts to support multiple output formats and customization options.
59+
MrDocs supports multiple output formats and customization options.
6060
In practice, MrDocs attempts to provide three levels of customization:
6161

6262
* At the first level, the user can use an existing generator and customize its templates and helper functions.
6363
* The user can write a MrDocs plugin at a second level that defines a new generator.
6464
* At a third level, it can use a generator for a structured file format and consume the output in a more uncomplicated secondary application or script.
6565

66-
These multiple levels of complexity mean developers can worry only about the documentation content.
66+
These multiple levels of complexity mean developers can focus solely on the documentation content.
6767
In practice, developers rarely need new generators and are usually only interested in changing how an existing generator formats the output.
6868
Removing the necessity of writing and maintaining a secondary application only to customize the output via XML files can save these developers an immense amount of time.
6969

70+
=== Custom Main Pages
71+
72+
This customized design means MrDocs does not need to support custom main pages directly. Instead, you can create your own by writing your markup files. These pages are authored entirely by the user and can be seamlessly combined with the MrDocs output, since the output is designed to be customized to your needs.
73+
7074
== {cpp} Constructs
7175

7276
To deal with the complexity of {cpp} constructs, MrDocs uses clang's libtooling API.

docs/modules/ROOT/pages/generators.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= Generators
22

3-
MrDocs uses a generator to convert the extracted symbols into documentation.
4-
MrDocs supports multiple output formats that can be specified via the `generate` option:
3+
Mr.Docs uses a generator to convert the extracted symbols into documentation.
4+
Mr.Docs supports multiple output formats that can be specified via the `generate` option:
55

66
The `generator` option can be used to specify the output format:
77

@@ -42,7 +42,7 @@ HTML can be generated directly with the `html` format.
4242

4343
== Choosing the Right Generator
4444

45-
The scatter plot below illustrates the available output formats for MrDocs, along with hypothetical solutions, in terms of **redundancy** and **convenience**.
45+
The scatter plot below illustrates the available output formats for Mr.Docs, along with hypothetical solutions, in terms of **redundancy** and **convenience**.
4646

4747
image::generator_front.svg[Output Formats Scatter Plot,width=600]
4848

@@ -56,7 +56,7 @@ Although Clang can generate and print an Abstract Syntax Tree (AST) directly for
5656
- Equivalent symbols can be redeclared multiple times in the same translation unit and across translation units.
5757
- The documentation for equivalent symbols also needs to be unified.
5858

59-
The scatter plot shows the following output formats supported by MrDocs:
59+
The scatter plot shows the following output formats supported by Mr.Docs:
6060

6161
1. **XML**: Aggregates all symbols and their documentation in a format that is straightforward to process.
6262
It's suitable for advanced use cases involving custom post-processing tools.
@@ -73,7 +73,7 @@ Dots in the background represent other potential formats that do not lie on the
7373
[#generator-templates]
7474
== Generator Templates
7575

76-
MrDocs attempts to support various alternatives for customizing the output format and style without complex workflows to post-process XML output.
76+
Mr.Docs attempts to support various alternatives for customizing the output format and style without complex workflows to post-process XML output.
7777
The `adoc` and `html` generators use https://handlebarsjs.com/[Handlebars,window=_blank] templates.
7878
These templates can be customized to change the output format and style of the documentation.
7979

docs/modules/ROOT/pages/index.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
= MrDocs
1+
= Mr.Docs
22
Alan Freitas <alandefreitas@gmail.com>
3-
:description: MrDocs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
3+
:description: Mr.Docs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
44
:sectanchors:
55
:url-repo: https://github.com/cppalliance/mrdocs
66
:page-tags: mrdocs
@@ -12,7 +12,7 @@ image::MrDocsBanner.jpg[link=https://www.mrdocs.com]
1212
- However, documenting {cpp} poses significant challenges due to discrepancies between the codebase and the public API. Doxygen remains a popular tool, yet it is suboptimal for {cpp} as it fails to fully comprehend {cpp} constructs and requires many transformation steps, including the incorporation of many macros within the {cpp} code. These macros maintain well-formed and ill-formed versions of the code, undermining the goal of unifying the source of truth.
1313
- Existing solutions frequently need better maintenance or usability issues, prompting users to revert to Doxygen.
1414
- An ideal solution would inherently understand {cpp} constructs, be actively maintained, and offer diverse options for customizing the output format.
15-
- MrDocs embodies these qualities. Supported by full-time developers from the {cpp} Alliance, MrDocs inherently comprehends {cpp} constructs without the need for macros and provides various output formats, customizable templates, and plugin support, ensuring it meets the demands of comprehensive and efficient documentation.
15+
- Mr.Docs embodies these qualities. Supported by full-time developers from the {cpp} Alliance, Mr.Docs inherently comprehends {cpp} constructs without the need for macros and provides various output formats, customizable templates, and plugin support, ensuring it meets the demands of comprehensive and efficient documentation.
1616
1717
image::https://github.com/cppalliance/mrdocs/actions/workflows/ci.yml/badge.svg[]
1818

docs/modules/ROOT/pages/install.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ mrdocs-releases::[]
1212
[#mrdocs-bootstrap-script]
1313
== Bootstrap Script
1414
15-
The bootstrap script available in the repository provides an alternative way to install MrDocs and its
16-
dependencies from source. Just run the script from the root of the MrDocs repository:
15+
The bootstrap script available in the repository provides an alternative way to install Mr.Docs and its
16+
dependencies from source. Just run the script from the root of the Mr.Docs repository:
1717
1818
[source,bash]
1919
----
@@ -22,7 +22,7 @@ cd mrdocs
2222
python bootstrap.py
2323
----
2424
25-
Or if you just want to install MrDocs without cloning the repository, you can run the script directly from the web:
25+
Or if you just want to install Mr.Docs without cloning the repository, you can run the script directly from the web:
2626
2727
[tabs]
2828
====
@@ -45,9 +45,9 @@ python -c "$(curl -fsSL https://raw.githubusercontent.com/cppalliance/mrdocs/ref
4545
--
4646
====
4747
48-
This method automates the download, configuration, and build steps for MrDocs and all required third-party libraries.
48+
This method automates the download, configuration, and build steps for Mr.Docs and all required third-party libraries.
4949
It is especially useful for developers and for users who prefer a streamlined, interactive setup or need to install
50-
MrDocs in custom environments.
50+
Mr.Docs in custom environments.
5151
5252
The script will prompt you for the installation directory and all other options.
5353
Every option can be defined in the command line directly instead of being prompted.
@@ -64,7 +64,7 @@ python bootstrap.py --non-interactive --mrdocs-build-type=Release --third-party-
6464
----
6565
6666
In the default case, the script will download the source code to the current directory
67-
and install MrDocs system-wide.
67+
and install Mr.Docs system-wide.
6868
6969
[tabs]
7070
====
@@ -89,13 +89,13 @@ python -c "$(curl -fsSL https://raw.githubusercontent.com/cppalliance/mrdocs/ref
8989
9090
The script handles tool checks, repository cloning, patching, and CMake configuration, reducing
9191
manual intervention and potential errors.
92-
This approach is recommended for developers, advanced users, or those integrating MrDocs
92+
This approach is recommended for developers, advanced users, or those integrating Mr.Docs
9393
into larger projects.
9494
9595
[#mrdocs-source]
9696
== Manually Install from Source
9797
98-
The following instructions assume we are at a parent directory that's going to contain both the MrDocs and the third-party dependencies directories.
98+
The following instructions assume we are at a parent directory that's going to contain both the Mr.Docs and the third-party dependencies directories.
9999
100100
[source]
101101
----
@@ -104,7 +104,7 @@ The following instructions assume we are at a parent directory that's going to c
104104
+ third-party
105105
----
106106
107-
Clone the MrDocs repository with:
107+
Clone the Mr.Docs repository with:
108108
109109
[source,bash]
110110
----
@@ -122,7 +122,7 @@ cd third-party
122122
[NOTE]
123123
====
124124
These instructions assume all dependencies are installed in the `third-party` directory for simplicity.
125-
Feel free to install them anywhere you want and adjust the main MrDocs configuration command later.
125+
Feel free to install them anywhere you want and adjust the main Mr.Docs configuration command later.
126126
====
127127
128128
[IMPORTANT]
@@ -133,7 +133,7 @@ Binaries are available at https://cmake.org/download/[CMake's official website,w
133133
134134
=== Duktape
135135
136-
MrDocs uses the `duktape` library for JavaScript parsing.
136+
Mr.Docs uses the `duktape` library for JavaScript parsing.
137137
From the `third-party` directory, you can download the `duktape` source code from the official release:
138138
139139
[tabs]

0 commit comments

Comments
 (0)