Skip to content

Commit 73608ab

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

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

README.md

+49-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,60 @@ 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+
At some point, we'll try and convert all of the existing legacy admonitions to the new style.
42+
43+
[PyMdown Documentation](https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/)
44+
45+
Enabled extensions:
46+
47+
```
48+
betterem
49+
blocks.admonition
50+
blocks.definition
51+
caret
52+
critic
53+
details
54+
emoji
55+
highlight
56+
inlinehilite
57+
keys
58+
mark
59+
saneheaders
60+
smartsymbols
61+
snippets
62+
superfences
63+
tabbed
64+
tilde
65+
```
66+
67+
See `markdown_extensions` in the [mkdocs.yml](mkdocs.yml) file for the current list.
68+
69+
2270
# Dynamic Documentation
2371

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

0 commit comments

Comments
 (0)