Skip to content

Commit f151f71

Browse files
committed
Prepare 7.2.0 release
1 parent d68fe91 commit f151f71

File tree

7 files changed

+68
-59
lines changed

7 files changed

+68
-59
lines changed

Diff for: CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
mkdocs-material-7.2.0 (2021-07-21)
2+
3+
* Added support for search suggestions to save keystrokes
4+
* Added support for search highlighting
5+
* Added support for search sharing (i.e. deep linking)
6+
17
mkdocs-material-7.1.11+insiders.2.11.1 (2021-07-20)
28

39
* Fixed order of tags index, now sorted alphabetically

Diff for: docs/changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ template: overrides/main.html
66

77
## Material for MkDocs
88

9+
### 7.2.0 <small>_ July 21, 2021</small>
10+
11+
- Added support for search suggestions to save keystrokes
12+
- Added support for search highlighting
13+
- Added support for search sharing (i.e. deep linking)
14+
915
### 7.1.11 <small>_ July 18, 2021</small>
1016

1117
- Updated Spanish and Galician translations

Diff for: docs/insiders/index.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ The following features are currently exclusively available to sponsors:
129129
- [x] [Section index pages][22]
130130
- [x] [Sticky navigation tabs][21]
131131
- [x] [Mermaid.js integration][27]
132-
- [x] [Search suggestions][18]
133-
- [x] [Search highlighting][19]
134-
- [x] [Search sharing][20]
135132
- [x] [Remove generator notice][23]
136133

137134
</div>
@@ -150,16 +147,6 @@ Following is a list of funding goals. When a funding goal is hit, the features
150147
that are tied to it are merged back into Material for MkDocs and released to
151148
the public for general availability.
152149

153-
#### $ 2,500 – Biquinho Vermelho
154-
155-
- [x] [Search suggestions][18]
156-
- [x] [Search highlighting][19]
157-
- [x] [Search sharing][20]
158-
159-
[18]: ../setup/setting-up-site-search.md#search-suggestions
160-
[19]: ../setup/setting-up-site-search.md#search-highlighting
161-
[20]: ../setup/setting-up-site-search.md#search-sharing
162-
163150
#### $ 3,000 – Caribbean Red
164151

165152
- [x] [Sticky navigation tabs][21]
@@ -225,6 +212,16 @@ the public for general availability.
225212

226213
### Goals completed
227214

215+
#### $ 2,500 – Biquinho Vermelho
216+
217+
- [x] [Search suggestions][18]
218+
- [x] [Search highlighting][19]
219+
- [x] [Search sharing][20]
220+
221+
[18]: ../setup/setting-up-site-search.md#search-suggestions
222+
[19]: ../setup/setting-up-site-search.md#search-highlighting
223+
[20]: ../setup/setting-up-site-search.md#search-sharing
224+
228225
#### $ 2,000 – Black Pearl
229226

230227
- [x] Latest release tag

Diff for: docs/setup/setting-up-site-search.md

+43-43
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ Use them at your own risk._
136136

137137
[:octicons-file-code-24: Source][8] ·
138138
:octicons-unlock-24: Feature flag ·
139-
:octicons-beaker-24: Experimental ·
140-
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
139+
:octicons-beaker-24: Experimental
141140

142141
When _search suggestions_ are enabled, the search will display the likeliest
143142
completion for the last word, saving the user many key strokes by accepting the
@@ -155,16 +154,15 @@ Searching for [:octicons-search-24: ^^search su^^][9] yields ^^search suggestion
155154

156155
[![Search suggestions][10]][10]
157156

158-
[8]: ../insiders/index.md
157+
[8]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/suggest/index.ts
159158
[9]: ?q=search+su
160159
[10]: ../assets/screenshots/search-suggestions.png
161160

162161
### Search highlighting
163162

164-
[:octicons-file-code-24: Source][8] ·
163+
[:octicons-file-code-24: Source][11] ·
165164
:octicons-unlock-24: Feature flag ·
166-
:octicons-beaker-24: Experimental ·
167-
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
165+
:octicons-beaker-24: Experimental
168166

169167
When _search highlighting_ is enabled and a user clicks on a search result,
170168
Material for MkDocs will highlight all occurrences after following the link.
@@ -176,22 +174,22 @@ theme:
176174
- search.highlight
177175
```
178176

179-
Searching for [:octicons-search-24: ^^code blocks^^][11] yields:
177+
Searching for [:octicons-search-24: ^^code blocks^^][12] yields:
180178

181-
[![Search highlighting][12]][12]
179+
[![Search highlighting][13]][13]
182180

183181
</figcaption>
184182
</figure>
185183

186-
[11]: ../reference/code-blocks.md?h=code+blocks
187-
[12]: ../assets/screenshots/search-highlighting.png
184+
[11]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/highlight/index.ts
185+
[12]: ../reference/code-blocks.md?h=code+blocks
186+
[13]: ../assets/screenshots/search-highlighting.png
188187

189188
### Search sharing
190189

191-
[:octicons-file-code-24: Source][8] ·
190+
[:octicons-file-code-24: Source][14] ·
192191
:octicons-unlock-24: Feature flag ·
193-
:octicons-beaker-24: Experimental ·
194-
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
192+
:octicons-beaker-24: Experimental
195193

196194
When _search sharing_ is activated, a :material-share-variant: share button is
197195
rendered next to the reset button, which allows to deep link to the current
@@ -206,26 +204,27 @@ theme:
206204
When a user clicks the share button, the URL is automatically copied to the
207205
clipboard.
208206

209-
[![Search sharing][13]][13]
207+
[![Search sharing][15]][15]
210208

211-
[13]: ../assets/screenshots/search-share.png
209+
[14]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/share/index.ts
210+
[15]: ../assets/screenshots/search-share.png
212211

213212
### Offline search
214213

215-
[:octicons-file-code-24: Source][14] ·
216-
[:octicons-cpu-24: Plugin][15] · :octicons-beaker-24: Experimental
214+
[:octicons-file-code-24: Source][16] ·
215+
[:octicons-cpu-24: Plugin][17]
217216

218217
If you distribute your documentation as `*.html` files, the built-in search
219218
will not work out-of-the-box due to the restrictions modern browsers impose for
220-
security reasons. This can be mitigated with the [localsearch][15] plugin in
221-
combination with @squidfunk's [iframe-worker][16] polyfill.
219+
security reasons. This can be mitigated with the [localsearch][17] plugin in
220+
combination with @squidfunk's [iframe-worker][18] polyfill.
222221

223-
For setup instructions, refer to the [official documentation][17].
222+
For setup instructions, refer to the [official documentation][19].
224223

225-
[14]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html
226-
[15]: https://github.com/wilhelmer/mkdocs-localsearch/
227-
[16]: https://github.com/squidfunk/iframe-worker
228-
[17]: https://github.com/wilhelmer/mkdocs-localsearch#installation-material-v5
224+
[16]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html
225+
[17]: https://github.com/wilhelmer/mkdocs-localsearch/
226+
[18]: https://github.com/squidfunk/iframe-worker
227+
[19]: https://github.com/wilhelmer/mkdocs-localsearch#installation-material-v5
229228

230229
!!! tip
231230

@@ -237,13 +236,13 @@ For setup instructions, refer to the [official documentation][17].
237236

238237
### Boosting a page
239238

240-
[:octicons-file-code-24: Source][8] ·
239+
[:octicons-file-code-24: Source][20] ·
241240
:octicons-note-24: Metadata ·
242-
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
241+
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][20]{ .mdx-insiders }
243242

244243
In order to give specific pages a higher relevance in search, [lunr][4] supports
245244
page-specific boosts, which can be defined for each page by leveraging the
246-
[Metadata][18] extension:
245+
[Metadata][21] extension:
247246

248247
``` bash
249248
---
@@ -255,7 +254,8 @@ search:
255254
...
256255
```
257256

258-
[18]: ../../reference/meta-tags/#metadata
257+
[20]: ../insiders/index.md
258+
[21]: ../../reference/meta-tags/#metadata
259259

260260
## Customization
261261

@@ -269,12 +269,12 @@ your needs.
269269

270270
### Query transformation
271271

272-
[:octicons-file-code-24: Source][19] ·
272+
[:octicons-file-code-24: Source][22] ·
273273
:octicons-mortar-board-24: Difficulty: _easy_
274274

275275
When a user enters a query into the search box, the query is pre-processed
276276
before it is submitted to the search index. Material for MkDocs will apply the
277-
following transformations, which can be customized by [extending the theme][20]:
277+
following transformations, which can be customized by [extending the theme][23]:
278278

279279
``` ts
280280
export function defaultTransform(query: string): string {
@@ -307,7 +307,7 @@ export function defaultTransform(query: string): string {
307307
If you want to switch to the default behavior of the `mkdocs` and `readthedocs`
308308
themes, both of which don't transform the query prior to submission, or
309309
customize the `transform` function, you can do this by [overriding the
310-
`config` block][21]:
310+
`config` block][24]:
311311

312312
``` html
313313
{% block config %}
@@ -325,19 +325,19 @@ customize the `transform` function, you can do this by [overriding the
325325
The `transform` function will receive the query string as entered by the user
326326
and must return the processed query string to be submitted to the search index.
327327

328-
[19]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/transform/index.ts
329-
[20]: ../customization.md#extending-the-theme
330-
[21]: ../customization.md#overriding-blocks-recommended
328+
[22]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/transform/index.ts
329+
[23]: ../customization.md#extending-the-theme
330+
[24]: ../customization.md#overriding-blocks-recommended
331331

332332
### Custom search
333333

334-
[:octicons-file-code-24: Source][22] ·
334+
[:octicons-file-code-24: Source][25] ·
335335
:octicons-mortar-board-24: Difficulty: _challenging_
336336

337-
Material for MkDocs implements search as part of a [web worker][23]. If you
337+
Material for MkDocs implements search as part of a [web worker][26]. If you
338338
want to switch the web worker with your own implementation, e.g. to submit
339339
search to an external service, you can add a custom JavaScript file to the
340-
`docs` directory and [override the `config` block][20]:
340+
`docs` directory and [override the `config` block][23]:
341341

342342
``` html
343343
{% block config %}
@@ -355,8 +355,8 @@ format using _discriminated unions_, i.e. through the `type` property of the
355355
message. See the following interface definitions to learn about the message
356356
formats:
357357

358-
- [:octicons-file-code-24: `SearchMessage`][24]
359-
- [:octicons-file-code-24: `SearchIndex` and `SearchResult`][25]
358+
- [:octicons-file-code-24: `SearchMessage`][27]
359+
- [:octicons-file-code-24: `SearchIndex` and `SearchResult`][28]
360360

361361
The sequence and direction of messages is rather intuitive:
362362

@@ -365,7 +365,7 @@ The sequence and direction of messages is rather intuitive:
365365
- :octicons-arrow-right-24: `SearchQueryMessage`
366366
- :octicons-arrow-left-24: `SearchResultMessage`
367367

368-
[22]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker
369-
[23]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
370-
[24]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker/message/index.ts
371-
[25]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/_/index.ts
368+
[25]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker
369+
[26]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
370+
[27]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker/message/index.ts
371+
[28]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/_/index.ts

Diff for: material/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<link rel="canonical" href="{{ page.canonical_url }}">
2828
{% endif %}
2929
<link rel="icon" href="{{ config.theme.favicon | url }}">
30-
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-7.1.11">
30+
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-7.2.0">
3131
{% endblock %}
3232
{% block htmltitle %}
3333
{% if page and page.meta and page.meta.title %}

Diff for: package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mkdocs-material",
3-
"version": "7.1.11",
3+
"version": "7.2.0",
44
"description": "A Material Design theme for MkDocs",
55
"keywords": [
66
"mkdocs",

0 commit comments

Comments
 (0)