You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -24,15 +24,15 @@ mkdocs serve
24
24
25
25
### Content
26
26
27
-
Most of it is in `docs/3/`, which is the documentation of the current major release. The core documentation directly in it, and module documentation in in a subfolder.
27
+
Most of it is in `docs/3/`, which is the documentation of the current major release. The core documentation directly in it, and module documentation in a subfolder.
28
28
Each module is documented by a YAML file, that is formatted by the MkDocs extension using `mkdocs_inspircd/templates/module.md.j2`.
29
29
The data is also interpreted by the documentation to generate tables in the core documentation (eg. to provide a list of all commands of all modules).
30
30
31
31
`docs/4/` contains preparatory work for the next major release.
32
32
33
33
### MkDocs extension
34
34
35
-
`mkdocs_inspircd/` contains an extension for MkDocs, that does two things things:
35
+
`mkdocs_inspircd/` contains an extension for MkDocs, that does two things:
36
36
37
37
#### Rendering module documentation
38
38
@@ -42,12 +42,12 @@ This avoids inconsistencies, and easier changes in the structure; and to access
42
42
To do this, the MkDocs extension implements [the `on_files` hook](https://www.mkdocs.org/dev-guide/plugins/#on_files), so MkDocs detects `.yml` files as source files (as if they were `.md`).
43
43
44
44
It also implements [the `on_page_read_source` hook](https://www.mkdocs.org/dev-guide/plugins/#on_page_read_source) to convert the YAML content to Markdown on the fly, because MkDocs tries to parse it.
45
-
This is done simply by rending`mkdocs_inspircd/templates/module.md.j2` with the YAML content as context.
45
+
This is done simply by rendering`mkdocs_inspircd/templates/module.md.j2` with the YAML content as context.
46
46
47
47
#### Jinja templating for Markdown
48
48
49
49
Some pages, like `docs/3/channel-modes.md`, use dynamic data to populate tables (eg. the table of all plugins' channel modes) without duplicating data from plugins.
50
-
This is done by the [the `on_page_markdown` hook](https://www.mkdocs.org/dev-guide/plugins/#on_page_markdown), which is executed just before MkDocs parses renders Markdown.
50
+
This is done by [the `on_page_markdown` hook](https://www.mkdocs.org/dev-guide/plugins/#on_page_markdown), which is executed just before MkDocs parses renders Markdown.
51
51
This hook interprets Markdown documents as if they were Jinja templates, and passes them module data in the context; which produces the final Markdown document.
0 commit comments