Skip to content

Commit 99bc1ae

Browse files
authored
📚 DOCS: Move plugin documentation (#163)
Moved to https://mdit-py-plugins.readthedocs.io
1 parent b0355bf commit 99bc1ae

File tree

2 files changed

+29
-42
lines changed

2 files changed

+29
-42
lines changed

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
("py:class", "markdown_it.helpers.parse_link_title._Result"),
5353
("py:class", "MarkdownIt"),
5454
("py:class", "_NodeType"),
55+
("py:class", "typing_extensions.Protocol"),
5556
]
5657

5758

@@ -78,6 +79,7 @@
7879

7980
intersphinx_mapping = {
8081
"python": ("https://docs.python.org/3.7", None),
82+
"mdit-py-plugins": ("https://mdit-py-plugins.readthedocs.io/en/latest/", None),
8183
}
8284

8385

docs/plugins.md

Lines changed: 27 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,49 @@
22

33
# Plugin extensions
44

5-
The following plugins are embedded within the core package (enabled when using the `"default"` preset configuration):
5+
The following plugins are embedded within the core package:
66

77
- [tables](https://help.github.com/articles/organizing-information-with-tables/) (GFM)
88
- [strikethrough](https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text) (GFM)
99

10-
Other plugins are then available *via* the [`mdit_py_plugins`](https://github.com/executablebooks/mdit-py-plugins).
10+
These can be enabled individually:
1111

12-
```{important}
13-
``markdown_it.extensions`` is now deprecated and plugins have been moved to
14-
[`mdit_py_plugins`](https://github.com/executablebooks/mdit-py-plugins)
12+
```python
13+
from markdown_it import MarkdownIt
14+
md = MarkdownIt("commonmark").enable('table')
1515
```
1616

17-
They can be chained and loaded *via*:
17+
or as part of a configuration:
1818

1919
```python
2020
from markdown_it import MarkdownIt
21-
from mdit_py_plugins import plugin1, plugin2
22-
md = MarkdownIt().use(plugin1, keyword=value).use(plugin2, keyword=value)
23-
html_string = md.render("some *Markdown*")
21+
md = MarkdownIt("gfm-like")
2422
```
2523

26-
```{eval-rst}
27-
.. autofunction:: mdit_py_plugins.anchors.anchors_plugin
28-
:noindex:
29-
30-
.. autofunction:: mdit_py_plugins.footnote.footnote_plugin
31-
:noindex:
32-
33-
.. autofunction:: mdit_py_plugins.front_matter.front_matter_plugin
34-
:noindex:
24+
```{seealso}
25+
See [](using.md)
26+
```
3527

36-
.. autofunction:: mdit_py_plugins.container.container_plugin
37-
:noindex:
28+
Many other plugins are then available *via* the `mdit-py-plugins` package, including:
3829

39-
.. autofunction:: mdit_py_plugins.deflist.deflist_plugin
40-
:noindex:
30+
- Front-matter
31+
- Footnotes
32+
- Definition lists
33+
- Task lists
34+
- Heading anchors
35+
- LaTeX math
36+
- Containers
37+
- Word count
4138

42-
.. autofunction:: mdit_py_plugins.texmath.texmath_plugin
43-
:noindex:
39+
For full information see: <https://mdit-py-plugins.readthedocs.io>
4440

45-
.. autofunction:: mdit_py_plugins.dollarmath.dollarmath_plugin
46-
:noindex:
41+
Or you can write them yourself!
4742

48-
.. autofunction:: mdit_py_plugins.amsmath.amsmath_plugin
49-
:noindex:
43+
They can be chained and loaded *via*:
5044

51-
.. autofunction:: mdit_py_plugins.tasklists.tasklists_plugin
52-
:noindex:
45+
```python
46+
from markdown_it import MarkdownIt
47+
from mdit_py_plugins import plugin1, plugin2
48+
md = MarkdownIt().use(plugin1, keyword=value).use(plugin2, keyword=value)
49+
html_string = md.render("some *Markdown*")
5350
```
54-
55-
`myst_blocks` and `myst_role` plugins are also available, for utilisation by the [MyST renderer](https://myst-parser.readthedocs.io/en/latest/using/syntax.html)
56-
57-
There are also many other plugins which could easily be ported (and hopefully will be):
58-
59-
- [subscript](https://github.com/markdown-it/markdown-it-sub)
60-
- [superscript](https://github.com/markdown-it/markdown-it-sup)
61-
- [abbreviation](https://github.com/markdown-it/markdown-it-abbr)
62-
- [emoji](https://github.com/markdown-it/markdown-it-emoji)
63-
- [insert](https://github.com/markdown-it/markdown-it-ins)
64-
- [mark](https://github.com/markdown-it/markdown-it-mark)
65-
- ... and [others](https://www.npmjs.org/browse/keyword/markdown-it-plugin)

0 commit comments

Comments
 (0)