Skip to content

Commit 2b5df26

Browse files
committed
feat: add mdsf to alternate recommended
1 parent 57e6c2e commit 2b5df26

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
[![Build Status][ci-badge]][ci-link] [![PyPI version][pypi-badge]][pypi-link]
44

5-
<!-- [![codecov.io][cov-badge]][cov-link]
6-
[cov-badge]: https://codecov.io/gh/executablebooks/mdformat-mkdocs/branch/main/graph/badge.svg
7-
[cov-link]: https://codecov.io/gh/executablebooks/mdformat-mkdocs
8-
-->
9-
105
An [mdformat](https://github.com/executablebooks/mdformat) plugin for [mkdocs](https://github.com/mkdocs/mkdocs) and packages commonly used with MkDocs ([mkdocs-material](https://squidfunk.github.io/mkdocs-material), [mkdocstrings](https://mkdocstrings.github.io), and [python-markdown](https://python-markdown.github.io))
116

127
Supports:
@@ -41,16 +36,22 @@ See the example test files, [./tests/pre-commit-test.md](https://raw.githubuserc
4136

4237
Add this package wherever you use `mdformat` and the plugin will be auto-recognized. No additional configuration necessary. For additional information on plugins, see [the official `mdformat` documentation here](https://mdformat.readthedocs.io/en/stable/users/plugins.html)
4338

44-
**Tip**: this package specifies an "extra" (`'recommended'`) for plugins that work well with typical documentation managed by `mkdocs`:
39+
### Optional Extras
40+
41+
This package specifies two optional "extra" plugins (`'recommended'` and `'recommended-mdsf'` ) for plugins that work well with typical documentation managed by `mkdocs`:
4542

46-
- [mdformat-beautysh](https://pypi.org/project/mdformat-beautysh)
47-
- [mdformat-black](https://pypi.org/project/mdformat-black)
48-
- [mdformat-config](https://pypi.org/project/mdformat-config)
49-
- [mdformat-footnote](https://pypi.org/project/mdformat-footnote)
50-
- [mdformat-front-matters](https://pypi.org/project/mdformat-front-matters) (previously [mdformat-frontmatter](https://pypi.org/project/mdformat-frontmatter))
51-
- [mdformat-simple-breaks](https://pypi.org/project/mdformat-simple-breaks)
52-
- [mdformat-web](https://pypi.org/project/mdformat-web)
53-
- [mdformat-wikilink](https://github.com/tmr232/mdformat-wikilink)
43+
- For `'recommended'`:
44+
- [mdformat-beautysh](https://pypi.org/project/mdformat-beautysh)
45+
- [mdformat-config](https://pypi.org/project/mdformat-config)
46+
- [mdformat-footnote](https://pypi.org/project/mdformat-footnote)
47+
- [mdformat-front-matters](https://pypi.org/project/mdformat-front-matters) (previously [mdformat-frontmatter](https://pypi.org/project/mdformat-frontmatter))
48+
- [mdformat-gfm](https://github.com/hukkin/mdformat-gfm)
49+
- [mdformat-ruff](https://github.com/Freed-Wu/mdformat-ruff)
50+
- [mdformat-simple-breaks](https://pypi.org/project/mdformat-simple-breaks)
51+
- [mdformat-web](https://pypi.org/project/mdformat-web)
52+
- [mdformat-wikilink](https://github.com/tmr232/mdformat-wikilink)
53+
- For `'recommended-mdsf'`:
54+
- Instead of `mdformat-beautysh`, `mdformat-config`, `mdformat-ruff`, and `mdformat-web`, the "mdsf" extras install `mdformat-hooks`, which allows the use of `mdsf` for formatting code blocks in hundreds of languages using CLI formatters you already have installed; however, this requires extra configuration, so make sure to see the README: <https://github.com/KyleKing/mdformat-hooks>
5455

5556
### pre-commit/prek
5657

@@ -63,6 +64,8 @@ repos:
6364
additional_dependencies:
6465
- mdformat-mkdocs
6566
# Or
67+
# - "mdformat-mkdocs[recommended-mdsf]>=5.1.0"
68+
# Or
6669
# - "mdformat-mkdocs[recommended]"
6770
```
6871

pyproject.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,23 @@ recommended = [
3737
"mdformat-config >= 0.2.1",
3838
"mdformat-footnote >= 0.1.1",
3939
"mdformat-front-matters >= 0.1.0",
40-
"mdformat-gfm >=1.0.0; python_version >= '3.10'",
40+
"mdformat-gfm >=1.0.0",
4141
"mdformat-ruff >= 0.1.3",
4242
"mdformat-simple-breaks >= 0.0.1",
43-
"mdformat-tables >=0.4.0; python_version < '3.10'",
4443
"mdformat-web >= 0.2.0",
4544
"mdformat-wikilink >= 0.2.0",
4645
# Patches https://github.com/lovesegfault/beautysh/issues/248 for Python 3.12
4746
"setuptools",
4847
]
48+
recommended-mdsf = [
49+
# Keep in-sync with README
50+
"mdformat-footnote >= 0.1.0",
51+
"mdformat-front-matters >= 1.0.1",
52+
"mdformat-gfm >=1.0.0",
53+
"mdformat-hooks >= 0.1.1",
54+
"mdformat-simple-breaks >= 0.0.1",
55+
"mdformat-wikilink >= 0.2.0",
56+
]
4957
test = [
5058
"beartype >= 0.21.0",
5159
"pytest >= 9.0.1",

0 commit comments

Comments
 (0)