diff --git a/CHANGELOG b/CHANGELOG index 8d26ddb02d55321994856ee86d95fd16c7692ddb..62a6472df8c01ac73a95ca55a87b2657e4ee739c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +mkdocs-material-1.8.0 (2017-08-02) + + * Added support for lazy-loading of search results for better performance + * Added support for customization of search tokenizer/separator + * Fixed #424: Search doesn't handle capital letters anymore + * Fixed #419: Search doesn't work on whole words + mkdocs-material-1.7.5 (2017-07-25) * Fixed #398: Forms broken due to search shortcuts diff --git a/docs/getting-started.md b/docs/getting-started.md index 26d49104d4e9a818ffa46244b8348370eb1a1ab8..a2a7b906f35a7baba35be9fecb2996f9d39ffa65 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -403,8 +403,6 @@ section on [overriding partials][18] and the general guide on #### Site search -##### Language - Site search is implemented using [lunr.js][21], which includes stemmers for the English language by default, while stemmers for other languages are included with [lunr-languages][22], both of which are integrated with this theme. Support @@ -434,6 +432,17 @@ Norwegian `no`, Swedish `sv` and Turkish `tr`. JavaScript payload by around 20kb (without gzip) and by another 15-30kb per language. +The separator for tokenization can also be customized, which makes it possible +to index parts of words that are separated by `-` or `.` for example: + +``` jinja +{% macro t(key) %}{{ { + ... + "search.tokenizer": "[\s\-\.]+", + ... +}[key] }}{% endmacro %} +``` + [21]: https://lunrjs.com [22]: https://github.com/MihaiValentin/lunr-languages diff --git a/docs/release-notes.md b/docs/release-notes.md index f308a5f5c67ed79c1ae80c83140d1d6c527d684e..d35f6af75ae9c0b05dee0f7596910248556713c5 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -12,11 +12,18 @@ To determine the currently installed version, use the following command: ``` sh pip show mkdocs-material | grep -E ^Version -# Version 1.7.5 +# Version 1.8.0 ``` ## Changelog +### 1.8.0 <small> _ August 2, 2017</small> + +* Added support for lazy-loading of search results for better performance +* Added support for customization of search tokenizer/separator +* Fixed [#424][424]: Search doesn't handle capital letters anymore +* Fixed [#419][419]: Search doesn't work on whole words + ### 1.7.5 <small> _ July 25, 2017</small> * Fixed [#398][398]: Forms broken due to search shortcuts diff --git a/material/base.html b/material/base.html index 35e7249a16ee2f568e5db2bc44f9cc6415fa1911..85fc250924031c156c8bc75eea0f4c133b6694b6 100644 --- a/material/base.html +++ b/material/base.html @@ -24,7 +24,7 @@ {% else %} <link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.png"> {% endif %} - <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-1.7.5"> + <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-1.8.0"> {% endblock %} {% block htmltitle %} {% if page and page.meta.title %} diff --git a/package.json b/package.json index b70ea2cc8aac449d3e2e3caf53cf2ae8a577e913..1a547912bf1582cb4abe8a09d8fdd226a90bd066 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mkdocs-material", - "version": "1.7.5", + "version": "1.8.0", "description": "A Material Design theme for MkDocs", "keywords": [ "mkdocs",