mkdocs-techdocs-core 1.4.0__tar.gz → 1.4.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mkdocs-techdocs-core
3
- Version: 1.4.0
3
+ Version: 1.4.1
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
@@ -33,6 +33,14 @@ Description: # mkdocs-techdocs-core
33
33
  - techdocs-core
34
34
  ```
35
35
 
36
+ (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`:
37
+
38
+ ```yaml
39
+ plugins:
40
+ - techdocs-core:
41
+ use_material_search: true
42
+ ```
43
+
36
44
  ## Development
37
45
 
38
46
  ### Running Locally
@@ -149,6 +157,9 @@ Description: # mkdocs-techdocs-core
149
157
 
150
158
  ## Changelog
151
159
 
160
+ ### 1.4.1
161
+ - Introduced mkdocs-redirects plugin (v`1.2.1`).
162
+
152
163
  ### 1.4.0
153
164
  - Updated minimum mkdocs dependency from `1.5` to `1.6`
154
165
  - Fixes issue [#187](https://github.com/backstage/mkdocs-techdocs-core/issues/187)
@@ -25,6 +25,14 @@ plugins:
25
25
  - techdocs-core
26
26
  ```
27
27
 
28
+ (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`:
29
+
30
+ ```yaml
31
+ plugins:
32
+ - techdocs-core:
33
+ use_material_search: true
34
+ ```
35
+
28
36
  ## Development
29
37
 
30
38
  ### Running Locally
@@ -141,6 +149,9 @@ We only use `material-mkdocs` as base styles because Backstage also uses the `Ma
141
149
 
142
150
  ## Changelog
143
151
 
152
+ ### 1.4.1
153
+ - Introduced mkdocs-redirects plugin (v`1.2.1`).
154
+
144
155
  ### 1.4.0
145
156
  - Updated minimum mkdocs dependency from `1.5` to `1.6`
146
157
  - Fixes issue [#187](https://github.com/backstage/mkdocs-techdocs-core/issues/187)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mkdocs-techdocs-core
3
- Version: 1.4.0
3
+ Version: 1.4.1
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
@@ -33,6 +33,14 @@ Description: # mkdocs-techdocs-core
33
33
  - techdocs-core
34
34
  ```
35
35
 
36
+ (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`:
37
+
38
+ ```yaml
39
+ plugins:
40
+ - techdocs-core:
41
+ use_material_search: true
42
+ ```
43
+
36
44
  ## Development
37
45
 
38
46
  ### Running Locally
@@ -149,6 +157,9 @@ Description: # mkdocs-techdocs-core
149
157
 
150
158
  ## Changelog
151
159
 
160
+ ### 1.4.1
161
+ - Introduced mkdocs-redirects plugin (v`1.2.1`).
162
+
152
163
  ### 1.4.0
153
164
  - Updated minimum mkdocs dependency from `1.5` to `1.6`
154
165
  - Fixes issue [#187](https://github.com/backstage/mkdocs-techdocs-core/issues/187)
@@ -1,9 +1,10 @@
1
1
  mkdocs>=1.6
2
2
  Markdown<3.4,>=3.2
3
- mkdocs-material==9.5.27
3
+ mkdocs-material==9.5.33
4
4
  markdown_inline_graphviz_extension==1.1.2
5
5
  mkdocs-monorepo-plugin==1.1.0
6
- plantuml-markdown==3.9.7
6
+ plantuml-markdown==3.10.3
7
7
  mdx_truly_sane_lists==1.3
8
8
  pymdown-extensions==10.3.1
9
9
  pygments==2.17.2
10
+ mkdocs-redirects==1.2.1
@@ -9,13 +9,14 @@ Markdown>=3.2,<3.4
9
9
  # pinned to an exact version. Bumps should be accompanied by release notes
10
10
  # explaining what was added or fixed (or at least pointing to the underlying
11
11
  # release notes of the bumped package).
12
- mkdocs-material==9.5.27
12
+ mkdocs-material==9.5.33
13
13
  markdown_inline_graphviz_extension==1.1.2
14
14
  mkdocs-monorepo-plugin==1.1.0
15
- plantuml-markdown==3.9.7
15
+ plantuml-markdown==3.10.3
16
16
  mdx_truly_sane_lists==1.3
17
17
  pymdown-extensions==10.3.1
18
18
  pygments==2.17.2
19
+ mkdocs-redirects==1.2.1
19
20
 
20
21
  # The following are temporary dependencies that are only necessary to work
21
22
  # around incompatible/conflicting underlying dependencies. Each dependency
@@ -28,7 +28,7 @@ with open("requirements.txt") as f:
28
28
 
29
29
  setup(
30
30
  name="mkdocs-techdocs-core",
31
- version="1.4.0",
31
+ version="1.4.1",
32
32
  description="The core MkDocs plugin used by Backstage's TechDocs as a wrapper around "
33
33
  "multiple MkDocs plugins and Python Markdown extensions",
34
34
  long_description=long_description,
@@ -20,6 +20,7 @@ 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
25
26
 
@@ -74,9 +75,15 @@ class TechDocsCore(BasePlugin):
74
75
  config["theme"].dirs.append(self.tmp_dir_techdocs_theme.name)
75
76
 
76
77
  # Plugins
78
+ use_material_search = config["plugins"]["techdocs-core"].config.get(
79
+ "use_material_search", False
80
+ )
77
81
  del config["plugins"]["techdocs-core"]
78
82
 
79
- search_plugin = SearchPlugin()
83
+ if use_material_search:
84
+ search_plugin = MaterialSearchPlugin()
85
+ else:
86
+ search_plugin = SearchPlugin()
80
87
  search_plugin.load_config({})
81
88
 
82
89
  monorepo_plugin = MonorepoPlugin()
@@ -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
+ )