mkdocs-techdocs-core 1.4.0__py3-none-any.whl → 1.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mkdocs_techdocs_core-1.4.0.dist-info → mkdocs_techdocs_core-1.4.2.dist-info}/METADATA +19 -4
- mkdocs_techdocs_core-1.4.2.dist-info/RECORD +9 -0
- src/core.py +20 -2
- src/test_core.py +18 -0
- mkdocs_techdocs_core-1.4.0.dist-info/RECORD +0 -9
- {mkdocs_techdocs_core-1.4.0.dist-info → mkdocs_techdocs_core-1.4.2.dist-info}/LICENSE +0 -0
- {mkdocs_techdocs_core-1.4.0.dist-info → mkdocs_techdocs_core-1.4.2.dist-info}/WHEEL +0 -0
- {mkdocs_techdocs_core-1.4.0.dist-info → mkdocs_techdocs_core-1.4.2.dist-info}/entry_points.txt +0 -0
- {mkdocs_techdocs_core-1.4.0.dist-info → mkdocs_techdocs_core-1.4.2.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mkdocs-techdocs-core
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
|
|
5
5
|
Home-page: https://github.com/backstage/mkdocs-techdocs-core
|
|
6
6
|
Author: TechDocs Core
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: protean@spotify.com
|
|
8
8
|
License: Apache-2.0
|
|
9
9
|
Keywords: mkdocs
|
|
10
10
|
Platform: UNKNOWN
|
|
@@ -19,13 +19,14 @@ Requires-Python: >=3.7
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
Requires-Dist: mkdocs >=1.6
|
|
21
21
|
Requires-Dist: Markdown <3.4,>=3.2
|
|
22
|
-
Requires-Dist: mkdocs-material ==9.5.
|
|
22
|
+
Requires-Dist: mkdocs-material ==9.5.33
|
|
23
23
|
Requires-Dist: markdown-inline-graphviz-extension ==1.1.2
|
|
24
24
|
Requires-Dist: mkdocs-monorepo-plugin ==1.1.0
|
|
25
|
-
Requires-Dist: plantuml-markdown ==3.
|
|
25
|
+
Requires-Dist: plantuml-markdown ==3.10.3
|
|
26
26
|
Requires-Dist: mdx-truly-sane-lists ==1.3
|
|
27
27
|
Requires-Dist: pymdown-extensions ==10.3.1
|
|
28
28
|
Requires-Dist: pygments ==2.17.2
|
|
29
|
+
Requires-Dist: mkdocs-redirects ==1.2.1
|
|
29
30
|
|
|
30
31
|
# mkdocs-techdocs-core
|
|
31
32
|
|
|
@@ -54,6 +55,14 @@ plugins:
|
|
|
54
55
|
- techdocs-core
|
|
55
56
|
```
|
|
56
57
|
|
|
58
|
+
(Optional) To use material theme search to generate the `search/search_index.json` (responsible for the search functionality in the TechDocs reader), you need to add the following configuration to your `mkdocs.yml`:
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
plugins:
|
|
62
|
+
- techdocs-core:
|
|
63
|
+
use_material_search: true
|
|
64
|
+
```
|
|
65
|
+
|
|
57
66
|
## Development
|
|
58
67
|
|
|
59
68
|
### Running Locally
|
|
@@ -170,6 +179,12 @@ We only use `material-mkdocs` as base styles because Backstage also uses the `Ma
|
|
|
170
179
|
|
|
171
180
|
## Changelog
|
|
172
181
|
|
|
182
|
+
### 1.4.2
|
|
183
|
+
- Fixes an issue where individual extension configurations were being ignored if the extension was included within `pymdownx.extra`. See [#147](https://github.com/backstage/mkdocs-techdocs-core/issues/147)
|
|
184
|
+
|
|
185
|
+
### 1.4.1
|
|
186
|
+
- Introduced mkdocs-redirects plugin (v`1.2.1`).
|
|
187
|
+
|
|
173
188
|
### 1.4.0
|
|
174
189
|
- Updated minimum mkdocs dependency from `1.5` to `1.6`
|
|
175
190
|
- Fixes issue [#187](https://github.com/backstage/mkdocs-techdocs-core/issues/187)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
src/core.py,sha256=2UvM9tIDeF0ysG5KsN_p19hq87nPUqx7DIMOqu9PwjQ,6460
|
|
3
|
+
src/test_core.py,sha256=8bt7-qKuDycZrrNYS12p-s9wkaxuxu3LHDNR0Q6C8zM,5984
|
|
4
|
+
mkdocs_techdocs_core-1.4.2.dist-info/LICENSE,sha256=eQI8sD8vCx0f8ZQg0xdn3DfPxUcbJowsI_uJQk8B4WI,11354
|
|
5
|
+
mkdocs_techdocs_core-1.4.2.dist-info/METADATA,sha256=rzCzpH450nqsQzlYoCqM-_onKiiQYFW-_6g1JQOM13Y,18063
|
|
6
|
+
mkdocs_techdocs_core-1.4.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
+
mkdocs_techdocs_core-1.4.2.dist-info/entry_points.txt,sha256=9757aJlPhODN46FiNvcJyTcFo1TbPJ2E6QLTvBOz-6M,56
|
|
8
|
+
mkdocs_techdocs_core-1.4.2.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
|
|
9
|
+
mkdocs_techdocs_core-1.4.2.dist-info/RECORD,,
|
src/core.py
CHANGED
|
@@ -20,8 +20,10 @@ import os
|
|
|
20
20
|
from mkdocs.plugins import BasePlugin
|
|
21
21
|
from mkdocs.theme import Theme
|
|
22
22
|
from mkdocs.contrib.search import SearchPlugin
|
|
23
|
+
from material.plugins.search.plugin import SearchPlugin as MaterialSearchPlugin
|
|
23
24
|
from mkdocs_monorepo_plugin.plugin import MonorepoPlugin
|
|
24
25
|
from pymdownx.emoji import to_svg
|
|
26
|
+
from pymdownx.extra import extra_extensions
|
|
25
27
|
|
|
26
28
|
log = logging.getLogger(__name__)
|
|
27
29
|
|
|
@@ -74,9 +76,15 @@ class TechDocsCore(BasePlugin):
|
|
|
74
76
|
config["theme"].dirs.append(self.tmp_dir_techdocs_theme.name)
|
|
75
77
|
|
|
76
78
|
# Plugins
|
|
79
|
+
use_material_search = config["plugins"]["techdocs-core"].config.get(
|
|
80
|
+
"use_material_search", False
|
|
81
|
+
)
|
|
77
82
|
del config["plugins"]["techdocs-core"]
|
|
78
83
|
|
|
79
|
-
|
|
84
|
+
if use_material_search:
|
|
85
|
+
search_plugin = MaterialSearchPlugin()
|
|
86
|
+
else:
|
|
87
|
+
search_plugin = SearchPlugin()
|
|
80
88
|
search_plugin.load_config({})
|
|
81
89
|
|
|
82
90
|
monorepo_plugin = MonorepoPlugin()
|
|
@@ -107,7 +115,6 @@ class TechDocsCore(BasePlugin):
|
|
|
107
115
|
config["markdown_extensions"].append("pymdownx.mark")
|
|
108
116
|
config["markdown_extensions"].append("pymdownx.smartsymbols")
|
|
109
117
|
config["markdown_extensions"].append("pymdownx.snippets")
|
|
110
|
-
config["markdown_extensions"].append("pymdownx.superfences")
|
|
111
118
|
config["markdown_extensions"].append("pymdownx.highlight")
|
|
112
119
|
config["mdx_configs"]["pymdownx.highlight"] = {
|
|
113
120
|
"linenums": True,
|
|
@@ -127,6 +134,17 @@ class TechDocsCore(BasePlugin):
|
|
|
127
134
|
}
|
|
128
135
|
config["markdown_extensions"].append("pymdownx.tilde")
|
|
129
136
|
|
|
137
|
+
# merge individual extension configs under the pymdownx.extra extension namespace if individual extension is supplied by pymdownx.extra
|
|
138
|
+
# https://facelessuser.github.io/pymdown-extensions/extensions/extra/
|
|
139
|
+
if "pymdownx.extra" not in config["mdx_configs"]:
|
|
140
|
+
config["mdx_configs"]["pymdownx.extra"] = {}
|
|
141
|
+
for extension in extra_extensions:
|
|
142
|
+
if extension in config["mdx_configs"]:
|
|
143
|
+
config["mdx_configs"]["pymdownx.extra"][extension] = config[
|
|
144
|
+
"mdx_configs"
|
|
145
|
+
][extension]
|
|
146
|
+
del config["mdx_configs"][extension]
|
|
147
|
+
|
|
130
148
|
config["markdown_extensions"].append("markdown_inline_graphviz")
|
|
131
149
|
config["markdown_extensions"].append("plantuml_markdown")
|
|
132
150
|
config["markdown_extensions"].append("mdx_truly_sane_lists")
|
src/test_core.py
CHANGED
|
@@ -111,3 +111,21 @@ class TestTechDocsCoreConfig(unittest.TestCase):
|
|
|
111
111
|
final_config["mdx_configs"]["pymdownx.snippets"]["restrict_base_path"],
|
|
112
112
|
True,
|
|
113
113
|
)
|
|
114
|
+
|
|
115
|
+
def test_material_search(self):
|
|
116
|
+
self.plugin_collection["techdocs-core"].load_config(
|
|
117
|
+
{"use_material_search": True}
|
|
118
|
+
)
|
|
119
|
+
final_config = self.techdocscore.on_config(self.mkdocs_yaml_config)
|
|
120
|
+
|
|
121
|
+
self.assertEqual(
|
|
122
|
+
final_config["plugins"]["search"].__module__,
|
|
123
|
+
"material.plugins.search.plugin",
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
def test_default_search(self):
|
|
127
|
+
self.plugin_collection["techdocs-core"].load_config({})
|
|
128
|
+
final_config = self.techdocscore.on_config(self.mkdocs_yaml_config)
|
|
129
|
+
self.assertEqual(
|
|
130
|
+
final_config["plugins"]["search"].__module__, "mkdocs.contrib.search"
|
|
131
|
+
)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
src/core.py,sha256=OAIjtgYzgWNN-L3xLnu4kN36m2K2TB6ABkeYoLIAYGg,5551
|
|
3
|
-
src/test_core.py,sha256=UN8dKD3vEaZp7YB6JE-13QDc3Fuh64KQj_brdk926Bg,5323
|
|
4
|
-
mkdocs_techdocs_core-1.4.0.dist-info/LICENSE,sha256=eQI8sD8vCx0f8ZQg0xdn3DfPxUcbJowsI_uJQk8B4WI,11354
|
|
5
|
-
mkdocs_techdocs_core-1.4.0.dist-info/METADATA,sha256=MAkqrpJ6Nw4q8iqxUPvLuQvlJh8E8ezW4L_o-dCIbwE,17457
|
|
6
|
-
mkdocs_techdocs_core-1.4.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
-
mkdocs_techdocs_core-1.4.0.dist-info/entry_points.txt,sha256=9757aJlPhODN46FiNvcJyTcFo1TbPJ2E6QLTvBOz-6M,56
|
|
8
|
-
mkdocs_techdocs_core-1.4.0.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
|
|
9
|
-
mkdocs_techdocs_core-1.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{mkdocs_techdocs_core-1.4.0.dist-info → mkdocs_techdocs_core-1.4.2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|