Skip to content

Commit 2a5c271

Browse files
authored
[T-240] fix docs typos
1 parent abac658 commit 2a5c271

2 files changed

Lines changed: 54 additions & 44 deletions

File tree

README.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RefDocGen is a reference documentation generator for .NET.
1111
## Features
1212

1313
- easy to use (installed as a [.NET tool](https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools))
14-
- supports all standard XML documentation tags
14+
- supports all [standard XML documentation tags](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags)
1515
- resolves `inheritdoc` tags
1616
- modern, responsive UI supporting both light and dark mode
1717
- support for documentation versioning
@@ -130,7 +130,7 @@ INPUT (pos. 0) Required. The assembly, project,
130130

131131
You can include static pages (like *index* or *FAQ*) in the generated documentation, following the steps below:
132132

133-
- create a directory (e.g., `static-pages/`) with `.html` or `.md` files
133+
- create a directory (e.g., `static-pages/`) with `.md` (preferred) or `.html` files
134134
- each file represents a page and should contain its the body content
135135
- run the generator with:
136136

@@ -142,28 +142,37 @@ You can include static pages (like *index* or *FAQ*) in the generated documentat
142142
**Important: The static pages are not designed to offer the functionality of a full-fledged SSG. If you want more control over the pages, is advised to use an SSG, such as Jekyll, for user documentation.**
143143

144144
Additional notes:
145-
- it is possible to use relative links between pages
145+
- It is possible to use relative links between pages. (Links to `.md` files are automatically updated to point to the correct output HTML files in the generated documentation.)
146146
- you can include images, JS, or any other resources in the static pages directory, and then reference them from the pages
147-
- to add custom CSS styles, put them into `/css/styles.css` and they will be included automatically (however, use custom styles only for minor tweaks, rather than completely changing the overall appearance of the page)
148147
- it is possible to put the pages (and other files) into subdirectories of the `static-pages/` directory (however, pages nested three or more levels deep will not appear in the top menu)
148+
- in case you use HTML pages, to add custom CSS styles, put them into `/css/styles.css` and they will be included automatically (however, use custom styles only for minor tweaks, rather than completely changing the overall appearance of the page)
149149

150-
#### Example
151150

152-
Directory structure:
151+
## Example
152+
153+
Example directory structure:
153154
```
154155
static-pages/
155-
index.html
156-
FAQ.md
156+
index.md
157+
FAQ.html
158+
```
159+
160+
`index.md`
161+
```markdown
162+
# MyLibrary Reference Documentation
163+
164+
This page contains the reference documentation for MyLibrary.
165+
166+
## Installation
167+
To install, run `dotnet tool install my-library`.
157168
```
158169

159-
`index.html`
170+
`FAQ.html`
160171
```html
161-
<h1>
162-
MyLibrary reference documentation
163-
</h1>
164-
<div>
165-
This page contains the reference documentation of MyLibrary.
166-
</div>
172+
<h1>FAQ</h1>
173+
174+
<h6>Q1: How to install the library?</h6>
175+
<div class="fw-light">A1: ...</div>
167176
```
168177

169178
`FAQ.md`
@@ -176,14 +185,14 @@ static-pages/
176185

177186
### Documentation versioning
178187

179-
You can optionally generate versioned documentation, allowing users to switch between multiple versions.
180-
To do this, it is necessary to use the `--doc-version` option.
188+
You can optionally generate versioned documentation, which allows users to switch between multiple versions.
189+
To do this, use the `--doc-version` option.
181190

182-
The version can be switched using the dropdown in the bottom menu.
191+
The version can then be switched using the dropdown menu at the bottom of the page.
183192

184193
#### Examples
185194

186-
Generate two versions of the documentation, using these commands (the output directory needs to be the same):
195+
Generate two versions of the documentation using these commands (the output directory must be the same):
187196

188197
```bash
189198
refdocgen MyLibrary.dll --doc-version v1.0
@@ -193,35 +202,31 @@ refdocgen MyLibrary.dll --doc-version v1.1
193202
```
194203

195204
The documentation versions do not necessarily have to match the library versions.
196-
For instance, we may create two documentation versions, one showing the public API, and the other including even private members, as illustrated below:
205+
For example, you may create two documentation versions: one showing only the public API, and another including private members, as illustrated below:
197206

198207
```
199208
refdocgen MyLibrary.dll --doc-version v1.0-public
200209
refdocgen MyLibrary.dll --doc-version v1.0-private --min-visibility Private
201210
```
202211

203-
An example of versioned documentation can be found [here](https://vl-cz.github.io/refdocgen-demo-refdocgen/index.html). \
204-
Note that the documentations consists of two versions: `v-public` - displays only the public API and `v-private` displaying all types and members
212+
An example of versioned documentation can be found [here](https://vl-cz.github.io/refdocgen-demo-example-library/index.html).
205213

206214
### YAML configuration
207-
Instead of using command line arguments, it is possible to use a YAML file for configuration. \
208-
Then:
209-
- we don't need to repeat the options every time
210-
- the configuration can be easily shared
215+
You can use a YAML file to configure RefDocGen instead of specifying options on the command line. This approach makes it easy to reuse and share your configuration.
211216

212217
The YAML file can be generated automatically using the `--save-config` flag (preferred) or created manually.
213218
It is recommended to name the file `refdocgen.yaml`.
214219

215-
The structure of YAML and command line configuration is very similar:
220+
YAML configuration closely mirrors the command-line options:
216221

217-
- all the keys in YAML have the same name as the matching command-line option (without the starting dashes), e.g. the `output-dir` key corresponds to the `--output-dir` option
218-
- the only mandatory key is the `input` (similar to the command-line configuration)
219-
- `save-config` option is not supported, as it does not make sense here
220-
- the default values are the same as in the command-line configuration
222+
- Each YAML key matches its corresponding command-line option (without leading dashes). For example, the `output-dir` key in YAML corresponds to the `--output-dir` option.
223+
- The only required key is `input`, just as on the command line.
224+
- The `save-config` option is not supported in YAML, as it doesn't make sense here
225+
- Default values are the same as those used for command-line options.
221226

222-
#### Examples
227+
#### Example
223228

224-
The following command results in creating the YAML displayed below:
229+
The following command generates a YAML configuration file as shown below:
225230

226231
```bash
227232
refdocgen MyLibrary.sln
@@ -253,6 +258,10 @@ exclude-namespaces:
253258
254259
The next time we want to use the same configuration, we just need to run `refdocgen refdocgen.yaml` and the configuration will be loaded from the YAML.
255260

261+
### Templates
262+
Currently, only the `Default` documentation template is available.
263+
However, it is possible to create custom templates, as described in the [official documentation](https://vl-cz.github.io/refdocgen/templates/available-templates.html).
264+
256265
### Limitations
257266

258267
#### Default UI languages

docs/templates/custom-Razor-templates.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ XML Tag HTML Representation
3030
<list type="bullet"> <ul class="refdocgen-bullet-list">
3131
<list type="number"> <ol class="refdocgen-number-list">
3232
<list type="table"> <table class="refdocgen-table">
33-
<listheader> <thead class="refdocgen-tableheader">
33+
<listheader> <thead class="refdocgen-table-header">
3434
<c> <code class="refdocgen-inline-code">
3535
<example> <div class="refdocgen-example">
3636
<paramref> <code class="refdocgen-paramref">
37-
<typeparamref> <code class="refdocgentypeparamref">
38-
<see href="..."> <a href="..." class="refdocgen-seehref">
39-
<see langword="..."> <code class="refdocgen-seelangword">
40-
<seealso href="..."> <a href="..." class="refdocgenseealso-href">
41-
<code> <pre><code class="refdocgen-codeblock"></code></pre>
37+
<typeparamref> <code class="refdocgen-typeparamref">
38+
<see href="..."> <a href="..." class="refdocgen-see-href">
39+
<see langword="..."> <code class="refdocgen-see-langword">
40+
<seealso href="..."> <a href="..." class="refdocgen-seealso-href">
41+
<code> <pre><code class="refdocgen-code-block"></code></pre>
4242
<term> within a bullet/number list <span class="refdocgen-list-term">
43-
<description> within a bullet/number list <span class="refdocgen-listdescription">
43+
<description> within a bullet/number list <span class="refdocgen-list-description">
4444
<item> within a bullet/number list <li class="refdocgen-list-item">
4545
<term> within a table <td class="refdocgen-table-term">
4646
<description> within a table <td class="refdocgen-table-element">
4747
<item> within a table <tr class="refdocgen-table-item">
48-
<see cref="..."> (link resolved) <a href="..." class="refdocgen-seecref">
49-
<seealso cref="..."> (link resolved) <a href="..." class="refdocgenseealso-cref">
50-
<see cref="..."> (link not resolved) <code class="refdocgen-see-cref-notfound">
51-
<seealso cref="..."> (link not resolved) <code class="refdocgen-seealso-crefnot-found">
48+
<see cref="..."> (link resolved) <a href="..." class="refdocgen-see-cref">
49+
<seealso cref="..."> (link resolved) <a href="..." class="refdocgen-seealso-cref">
50+
<see cref="..."> (link not resolved) <code class="refdocgen-see-cref-not-found">
51+
<seealso cref="..."> (link not resolved) <code class="refdocgen-seealso-cref-not-found">
5252
```
5353

5454
All of these CSS classes can be styled as needed. For example:
@@ -59,6 +59,7 @@ All of these CSS classes can be styled as needed. For example:
5959
}
6060
```
6161

62+
Ideally, use the `styles.css` file in `Todo/Templates/Static`, as this directory is copied to the output documentation folder.
6263
You can also inherit existing CSS classes using a CSS preprocessor, similar to how the default UI does it (see `TemplateProcessors/Default/Templates/Scss/styles.scss`).
6364

6465
#### 2. Create a custom configuration

0 commit comments

Comments
 (0)