Skip to content

Commit bff6f63

Browse files
committed
README.md: Update with info for PyMdown plugin extensions
1 parent 085e553 commit bff6f63

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

README.md

+47-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,58 @@ The static documentation contained in the ./docs/ directory is written directly
1313
All contributions are subject to the
1414
[Creative Commons Attribution-ShareAlike 3.0 United States](LICENSE.md) license.
1515

16-
# Markdown Flavor
16+
## Markdown Flavor
1717
The docs are written in standard markdown, not GitHub Flavored markdown. There are lots of extensions available though. Most of the extensions provided by [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/) are enabled except those only available to paying sponsors and a few that don't make sense in this environment.
1818

1919
> [!NOTE]
2020
> The conversion process that moved the documentation from the Confluence Wiki used equals signs `=====` and dashes `----` to denote headers. The new infrastructure renders those correctly but they do not get added to the page's table of contents. Going forward, you should always use hash signs `#`, `##`, `###`, etc to denote headers.
2121
22+
### PyMdown Extensions
23+
24+
Many extensions from the [PyMdown](https://facelessuser.github.io/pymdown-extensions/) plugin are also available. The `admonition` extension is particularly useful as a replacement for the legacy `!!! note` admonition style because it uses a trailer to mark the end of the admonition instead of just a blank line. This allows you to add things like code blocks and quotes inside admonitions.
25+
26+
Admonition Example:
27+
28+
```
29+
/// warning | Don't Do This
30+
Don't do this in your code!!!
31+
'''
32+
free(NULL);
33+
'''
34+
///
35+
```
36+
37+
You couldn't do that with the legacy `!!!` style admonition.
38+
39+
If you decide to use any of the extensions from this plugin (and you should use them where possible), don't use the legacy version in the same page. For instance, don't mix `///` admonitions with `!!!` admonitions in the same page. There's a good chance they won't render correctly.
40+
41+
[PyMdown Documentation](https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/)
42+
43+
Enabled extensions:
44+
45+
```
46+
betterem
47+
blocks.admonition
48+
blocks.definition
49+
caret
50+
critic
51+
details
52+
emoji
53+
highlight
54+
inlinehilite
55+
keys
56+
mark
57+
saneheaders
58+
smartsymbols
59+
snippets
60+
superfences
61+
tabbed
62+
tilde
63+
```
64+
65+
See `markdown_extensions` in the [mkdocs.yml](mkdocs.yml) file for the current list.
66+
67+
2268
# Dynamic Documentation
2369

2470
The dynamic documentation includes the pages generated from Asterisk itself and includes:

0 commit comments

Comments
 (0)