Prepare 7.2.0 release

This commit is contained in:
squidfunk 2021-07-21 17:19:05 +02:00
parent d68fe9102a
commit f151f71eea
7 changed files with 68 additions and 59 deletions

View File

@ -1,3 +1,9 @@
mkdocs-material-7.2.0 (2021-07-21)
* Added support for search suggestions to save keystrokes
* Added support for search highlighting
* Added support for search sharing (i.e. deep linking)
mkdocs-material-7.1.11+insiders.2.11.1 (2021-07-20) mkdocs-material-7.1.11+insiders.2.11.1 (2021-07-20)
* Fixed order of tags index, now sorted alphabetically * Fixed order of tags index, now sorted alphabetically

View File

@ -6,6 +6,12 @@ template: overrides/main.html
## Material for MkDocs ## Material for MkDocs
### 7.2.0 <small>_ July 21, 2021</small>
- Added support for search suggestions to save keystrokes
- Added support for search highlighting
- Added support for search sharing (i.e. deep linking)
### 7.1.11 <small>_ July 18, 2021</small> ### 7.1.11 <small>_ July 18, 2021</small>
- Updated Spanish and Galician translations - Updated Spanish and Galician translations

View File

@ -129,9 +129,6 @@ The following features are currently exclusively available to sponsors:
- [x] [Section index pages][22] - [x] [Section index pages][22]
- [x] [Sticky navigation tabs][21] - [x] [Sticky navigation tabs][21]
- [x] [Mermaid.js integration][27] - [x] [Mermaid.js integration][27]
- [x] [Search suggestions][18]
- [x] [Search highlighting][19]
- [x] [Search sharing][20]
- [x] [Remove generator notice][23] - [x] [Remove generator notice][23]
</div> </div>
@ -150,16 +147,6 @@ Following is a list of funding goals. When a funding goal is hit, the features
that are tied to it are merged back into Material for MkDocs and released to that are tied to it are merged back into Material for MkDocs and released to
the public for general availability. the public for general availability.
#### $ 2,500 Biquinho Vermelho
- [x] [Search suggestions][18]
- [x] [Search highlighting][19]
- [x] [Search sharing][20]
[18]: ../setup/setting-up-site-search.md#search-suggestions
[19]: ../setup/setting-up-site-search.md#search-highlighting
[20]: ../setup/setting-up-site-search.md#search-sharing
#### $ 3,000 Caribbean Red #### $ 3,000 Caribbean Red
- [x] [Sticky navigation tabs][21] - [x] [Sticky navigation tabs][21]
@ -225,6 +212,16 @@ the public for general availability.
### Goals completed ### Goals completed
#### $ 2,500 Biquinho Vermelho
- [x] [Search suggestions][18]
- [x] [Search highlighting][19]
- [x] [Search sharing][20]
[18]: ../setup/setting-up-site-search.md#search-suggestions
[19]: ../setup/setting-up-site-search.md#search-highlighting
[20]: ../setup/setting-up-site-search.md#search-sharing
#### $ 2,000 Black Pearl #### $ 2,000 Black Pearl
- [x] Latest release tag - [x] Latest release tag

View File

@ -136,8 +136,7 @@ Use them at your own risk._
[:octicons-file-code-24: Source][8] · [:octicons-file-code-24: Source][8] ·
:octicons-unlock-24: Feature flag · :octicons-unlock-24: Feature flag ·
:octicons-beaker-24: Experimental · :octicons-beaker-24: Experimental
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
When _search suggestions_ are enabled, the search will display the likeliest When _search suggestions_ are enabled, the search will display the likeliest
completion for the last word, saving the user many key strokes by accepting the 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
[![Search suggestions][10]][10] [![Search suggestions][10]][10]
[8]: ../insiders/index.md [8]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/suggest/index.ts
[9]: ?q=search+su [9]: ?q=search+su
[10]: ../assets/screenshots/search-suggestions.png [10]: ../assets/screenshots/search-suggestions.png
### Search highlighting ### Search highlighting
[:octicons-file-code-24: Source][8] · [:octicons-file-code-24: Source][11] ·
:octicons-unlock-24: Feature flag · :octicons-unlock-24: Feature flag ·
:octicons-beaker-24: Experimental · :octicons-beaker-24: Experimental
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
When _search highlighting_ is enabled and a user clicks on a search result, When _search highlighting_ is enabled and a user clicks on a search result,
Material for MkDocs will highlight all occurrences after following the link. Material for MkDocs will highlight all occurrences after following the link.
@ -176,22 +174,22 @@ theme:
- search.highlight - search.highlight
``` ```
Searching for [:octicons-search-24: ^^code blocks^^][11] yields: Searching for [:octicons-search-24: ^^code blocks^^][12] yields:
[![Search highlighting][12]][12] [![Search highlighting][13]][13]
</figcaption> </figcaption>
</figure> </figure>
[11]: ../reference/code-blocks.md?h=code+blocks [11]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/highlight/index.ts
[12]: ../assets/screenshots/search-highlighting.png [12]: ../reference/code-blocks.md?h=code+blocks
[13]: ../assets/screenshots/search-highlighting.png
### Search sharing ### Search sharing
[:octicons-file-code-24: Source][8] · [:octicons-file-code-24: Source][14] ·
:octicons-unlock-24: Feature flag · :octicons-unlock-24: Feature flag ·
:octicons-beaker-24: Experimental · :octicons-beaker-24: Experimental
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders }
When _search sharing_ is activated, a :material-share-variant: share button is When _search sharing_ is activated, a :material-share-variant: share button is
rendered next to the reset button, which allows to deep link to the current rendered next to the reset button, which allows to deep link to the current
@ -206,26 +204,27 @@ theme:
When a user clicks the share button, the URL is automatically copied to the When a user clicks the share button, the URL is automatically copied to the
clipboard. clipboard.
[![Search sharing][13]][13] [![Search sharing][15]][15]
[13]: ../assets/screenshots/search-share.png [14]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/components/search/share/index.ts
[15]: ../assets/screenshots/search-share.png
### Offline search ### Offline search
[:octicons-file-code-24: Source][14] · [:octicons-file-code-24: Source][16] ·
[:octicons-cpu-24: Plugin][15] · :octicons-beaker-24: Experimental [:octicons-cpu-24: Plugin][17]
If you distribute your documentation as `*.html` files, the built-in search If you distribute your documentation as `*.html` files, the built-in search
will not work out-of-the-box due to the restrictions modern browsers impose for will not work out-of-the-box due to the restrictions modern browsers impose for
security reasons. This can be mitigated with the [localsearch][15] plugin in security reasons. This can be mitigated with the [localsearch][17] plugin in
combination with @squidfunk's [iframe-worker][16] polyfill. combination with @squidfunk's [iframe-worker][18] polyfill.
For setup instructions, refer to the [official documentation][17]. For setup instructions, refer to the [official documentation][19].
[14]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html [16]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html
[15]: https://github.com/wilhelmer/mkdocs-localsearch/ [17]: https://github.com/wilhelmer/mkdocs-localsearch/
[16]: https://github.com/squidfunk/iframe-worker [18]: https://github.com/squidfunk/iframe-worker
[17]: https://github.com/wilhelmer/mkdocs-localsearch#installation-material-v5 [19]: https://github.com/wilhelmer/mkdocs-localsearch#installation-material-v5
!!! tip !!! tip
@ -237,13 +236,13 @@ For setup instructions, refer to the [official documentation][17].
### Boosting a page ### Boosting a page
[:octicons-file-code-24: Source][8] · [:octicons-file-code-24: Source][20] ·
:octicons-note-24: Metadata · :octicons-note-24: Metadata ·
[:octicons-heart-fill-24:{ .mdx-heart } Insiders only][8]{ .mdx-insiders } [:octicons-heart-fill-24:{ .mdx-heart } Insiders only][20]{ .mdx-insiders }
In order to give specific pages a higher relevance in search, [lunr][4] supports In order to give specific pages a higher relevance in search, [lunr][4] supports
page-specific boosts, which can be defined for each page by leveraging the page-specific boosts, which can be defined for each page by leveraging the
[Metadata][18] extension: [Metadata][21] extension:
``` bash ``` bash
--- ---
@ -255,7 +254,8 @@ search:
... ...
``` ```
[18]: ../../reference/meta-tags/#metadata [20]: ../insiders/index.md
[21]: ../../reference/meta-tags/#metadata
## Customization ## Customization
@ -269,12 +269,12 @@ your needs.
### Query transformation ### Query transformation
[:octicons-file-code-24: Source][19] · [:octicons-file-code-24: Source][22] ·
:octicons-mortar-board-24: Difficulty: _easy_ :octicons-mortar-board-24: Difficulty: _easy_
When a user enters a query into the search box, the query is pre-processed When a user enters a query into the search box, the query is pre-processed
before it is submitted to the search index. Material for MkDocs will apply the before it is submitted to the search index. Material for MkDocs will apply the
following transformations, which can be customized by [extending the theme][20]: following transformations, which can be customized by [extending the theme][23]:
``` ts ``` ts
export function defaultTransform(query: string): string { export function defaultTransform(query: string): string {
@ -307,7 +307,7 @@ export function defaultTransform(query: string): string {
If you want to switch to the default behavior of the `mkdocs` and `readthedocs` If you want to switch to the default behavior of the `mkdocs` and `readthedocs`
themes, both of which don't transform the query prior to submission, or themes, both of which don't transform the query prior to submission, or
customize the `transform` function, you can do this by [overriding the customize the `transform` function, you can do this by [overriding the
`config` block][21]: `config` block][24]:
``` html ``` html
{% block config %} {% block config %}
@ -325,19 +325,19 @@ customize the `transform` function, you can do this by [overriding the
The `transform` function will receive the query string as entered by the user The `transform` function will receive the query string as entered by the user
and must return the processed query string to be submitted to the search index. and must return the processed query string to be submitted to the search index.
[19]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/transform/index.ts [22]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/transform/index.ts
[20]: ../customization.md#extending-the-theme [23]: ../customization.md#extending-the-theme
[21]: ../customization.md#overriding-blocks-recommended [24]: ../customization.md#overriding-blocks-recommended
### Custom search ### Custom search
[:octicons-file-code-24: Source][22] · [:octicons-file-code-24: Source][25] ·
:octicons-mortar-board-24: Difficulty: _challenging_ :octicons-mortar-board-24: Difficulty: _challenging_
Material for MkDocs implements search as part of a [web worker][23]. If you Material for MkDocs implements search as part of a [web worker][26]. If you
want to switch the web worker with your own implementation, e.g. to submit want to switch the web worker with your own implementation, e.g. to submit
search to an external service, you can add a custom JavaScript file to the search to an external service, you can add a custom JavaScript file to the
`docs` directory and [override the `config` block][20]: `docs` directory and [override the `config` block][23]:
``` html ``` html
{% block config %} {% block config %}
@ -355,8 +355,8 @@ format using _discriminated unions_, i.e. through the `type` property of the
message. See the following interface definitions to learn about the message message. See the following interface definitions to learn about the message
formats: formats:
- [:octicons-file-code-24: `SearchMessage`][24] - [:octicons-file-code-24: `SearchMessage`][27]
- [:octicons-file-code-24: `SearchIndex` and `SearchResult`][25] - [:octicons-file-code-24: `SearchIndex` and `SearchResult`][28]
The sequence and direction of messages is rather intuitive: The sequence and direction of messages is rather intuitive:
@ -365,7 +365,7 @@ The sequence and direction of messages is rather intuitive:
- :octicons-arrow-right-24: `SearchQueryMessage` - :octicons-arrow-right-24: `SearchQueryMessage`
- :octicons-arrow-left-24: `SearchResultMessage` - :octicons-arrow-left-24: `SearchResultMessage`
[22]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker [25]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker
[23]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers [26]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
[24]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker/message/index.ts [27]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/worker/message/index.ts
[25]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/_/index.ts [28]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/search/_/index.ts

View File

@ -27,7 +27,7 @@
<link rel="canonical" href="{{ page.canonical_url }}"> <link rel="canonical" href="{{ page.canonical_url }}">
{% endif %} {% endif %}
<link rel="icon" href="{{ config.theme.favicon | url }}"> <link rel="icon" href="{{ config.theme.favicon | url }}">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-7.1.11"> <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-7.2.0">
{% endblock %} {% endblock %}
{% block htmltitle %} {% block htmltitle %}
{% if page and page.meta and page.meta.title %} {% if page and page.meta and page.meta.title %}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "mkdocs-material", "name": "mkdocs-material",
"version": "7.1.11", "version": "7.2.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "mkdocs-material", "name": "mkdocs-material",
"version": "7.1.11", "version": "7.2.0",
"description": "A Material Design theme for MkDocs", "description": "A Material Design theme for MkDocs",
"keywords": [ "keywords": [
"mkdocs", "mkdocs",