From 3b6ee1e1cb98e7fb7350d864036928f065954cc3 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 2 Aug 2017 14:31:23 +0200 Subject: [PATCH] Prepare 1.8.0 release --- CHANGELOG | 7 +++++++ docs/getting-started.md | 13 +++++++++++-- docs/release-notes.md | 9 ++++++++- material/base.html | 2 +- package.json | 2 +- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8d26ddb02..62a6472df 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 26d49104d..a2a7b906f 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 f308a5f5c..d35f6af75 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 _ August 2, 2017 + +* 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 _ July 25, 2017 * Fixed [#398][398]: Forms broken due to search shortcuts diff --git a/material/base.html b/material/base.html index 35e7249a1..85fc25092 100644 --- a/material/base.html +++ b/material/base.html @@ -24,7 +24,7 @@ {% else %} {% endif %} - + {% endblock %} {% block htmltitle %} {% if page and page.meta.title %} diff --git a/package.json b/package.json index b70ea2cc8..1a547912b 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",