From 4e65041849ee1c5638448d4ced1ec78ae41530e7 Mon Sep 17 00:00:00 2001 From: Peter Mosses Date: Sat, 31 Aug 2019 16:52:41 +0200 Subject: [PATCH 1/6] Revert "Add configuration option search_tokenizer_separator" This reverts commit 50cdf076b4c1859f5677919ccf2006e3ecc65e2e. --- _config.yml | 5 ----- assets/js/just-the-docs.js | 2 +- docs/search.md | 9 --------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/_config.yml b/_config.yml index a2e3952..d12d439 100644 --- a/_config.yml +++ b/_config.yml @@ -24,11 +24,6 @@ exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "pac # Enable or disable the site search search_enabled: true -# Set the search token separator -search_tokenizer_separator: /[\s\-/]+/ -# For hyphenated-word search: -# search_tokenizer_separator: /[\s/]+/ - # Enable or disable heading anchors heading_anchors: true diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index 308460e..aadbf82 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -53,7 +53,7 @@ function initSearch() { // Success! var data = JSON.parse(request.responseText); - lunr.tokenizer.separator = {{ site.search_tokenizer_separator }} + lunr.tokenizer.separator = /[\s\-/]+/ var index = lunr(function () { this.ref('id'); this.field('title', { boost: 200 }); diff --git a/docs/search.md b/docs/search.md index 74b398f..134e399 100644 --- a/docs/search.md +++ b/docs/search.md @@ -59,15 +59,6 @@ In your site's `_config.yml`, enable search: search_enabled: true ``` -The default is for hyphens to separate tokens in search terms: -`gem-based` is equivalent to `gem based`, matching either word. -To allow search for hyphenated words: - -```yaml -# Set the search token separator -search_tokenizer_separator: /[\s/]+/ -``` - ## Hiding pages from search Sometimes you might have a page that you don't want to be indexed for the search nor to show up in search results, e.g, a 404 page. To exclude a page from search, add the `search_exclude: true` parameter to the page's YAML front matter: From 7220197a1f29327479acbbcdd858d1b62e6ec81e Mon Sep 17 00:00:00 2001 From: Peter Mosses Date: Sat, 31 Aug 2019 23:19:03 +0200 Subject: [PATCH 2/6] Mathjax support added Mathjax config options added. `compress_html` config option changed, Mathjax script loaded by head when `page.mathjax` is truthy. Documentation and test page added. See also issue #198. --- _config.yml | 7 +- _includes/head.html | 12 ++- docs/configuration.md | 10 ++ docs/mathjax/index.md | 59 ++++++++++++ docs/mathjax/test.md | 207 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 293 insertions(+), 2 deletions(-) create mode 100644 docs/mathjax/index.md create mode 100644 docs/mathjax/test.md diff --git a/_config.yml b/_config.yml index d12d439..c53ecc3 100644 --- a/_config.yml +++ b/_config.yml @@ -50,5 +50,10 @@ compress_html: comments: all endings: all startings: [] - blank_lines: false + blanklines: true # required for Mathjax profile: false + +# For the Mathjax script loaded in the head of all pages with page.mathjax +mathjax: + source: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML + config: 'MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } })' diff --git a/_includes/head.html b/_includes/head.html index eae6a5e..322195a 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -29,7 +29,17 @@ {% if site.search_enabled != false %} {% endif %} - + + + + {% if page.mathjax %} + + + {% endif %} diff --git a/docs/configuration.md b/docs/configuration.md index 14422fd..b3b467c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -89,3 +89,13 @@ See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more # e.g, UA-1234567-89 ga_tracking: UA-5555555-55 ``` + +## Mathjax + +```yaml +compress_html: + blanklines: true # required for Mathjax +mathjax: + source: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML + config: 'MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } })' +``` diff --git a/docs/mathjax/index.md b/docs/mathjax/index.md new file mode 100644 index 0000000..128c54b --- /dev/null +++ b/docs/mathjax/index.md @@ -0,0 +1,59 @@ +--- +layout: default +title: Mathjax +nav_order: 8 +has_children: true +mathjax: true +--- + +# Mathjax + +To use [Mathjax] on a just-the-docs page: + +- include `mathjax: true` in the YAML preamble + +- enclose $$ \LaTeX $$ code in [kramdown math blocks] + +The default Mathjax options in `_config.yml` are: + +```yaml +compress_html: + blanklines: true # required for Mathjax +mathjax: + source: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML + config: 'MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } })' +``` + +Here is an example: + +$$ +\begin{align*} + & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right) + = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\ + & (x_1, \ldots, x_n) \left( \begin{array}{ccc} + \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\ + \vdots & \ddots & \vdots \\ + \phi(e_n, e_1) & \cdots & \phi(e_n, e_n) + \end{array} \right) + \left( \begin{array}{c} + y_1 \\ + \vdots \\ + y_n + \end{array} \right) +\end{align*} +$$ + +For further examples, see [this test page](test), adapted from a [test] +in [markdown-preview-plus]. + +[Mathjax]: https://www.mathjax.org + "Mathjax home page" + +[kramdown math blocks]: https://kramdown.gettalong.org/syntax.html#math-blocks + "kramdown math blocks documentation" + +[test]: https://github.com/atom-community/markdown-preview-plus/blob/master/EXAMPLE.md + "Markdown-preview-plus test file" + +[markdown-preview-plus]: https://atom.io/packages/markdown-preview-plus + "Markdown-preview-plus package page" diff --git a/docs/mathjax/test.md b/docs/mathjax/test.md new file mode 100644 index 0000000..450f329 --- /dev/null +++ b/docs/mathjax/test.md @@ -0,0 +1,207 @@ +--- +layout: default +title: Mathjax test +parent: Mathjax +mathjax: true +--- + +$$x$$ math at the start of the document + +Nested: $$M = \text{while e^2 $e^2$ do $c^2$ end}$$ + +**Numbered equations** + +$$ +\begin{equation} +\int_0^x \sin(x) dx +\label{eq:test} +\end{equation} +$$ + +$$\eqref{eq:test}$$ + +**Blockquotes** + +> 1. A block quote +> 2. With a list inside +> 3. With $$math$$ + +**Math environment Syntax testing** + +Inline Math should work with `$$` $$\frac{x+y}{y}$$ +but not `\(` \(\frac{x+y}{y}\) + +Use `$$` on separate lines: + +$$ +\int_{-\infty}^\infty e^{-x^2} = \sqrt{\pi} +$$ + + +Use `$$` on the same line: +$$ \frac{-b \pm \sqrt{b^2-4ac}}{2a} $$ + +Use `$$` on separate lines: + +$$ +a+b +$$ + +Use `$$` on the same line: $$E=mc^2$$ + +---- + +**Some Tex Functions** + +$$k \times k$$, $$n \times 2$$, $$2 \times n$$, $$\times$$ + +$$x \cdot y$$, $$\cdot$$ + +$$\sqrt{x^2+y^2+z^2}$$ + +$$\alpha \beta \gamma$$ + +$$ +\begin{aligned} +x\ &= y\\ +mc^2\ &= E +\end{aligned} +$$ + +---- + +**Escaped Math environments** + +In the following examples no math environments should render: + +a $5, a $10 and a \$100 Bill. + +All McScrooge sees + +\$$ + +and even more: + +\$$ + +\\[x+y\] +\\(x+y\) + +``` +$x +``` + +``` +\$ +``` + +`\$`, `\[ \]`, `$x$` + +---- + +**Testing `\newcommand`** + +For all $$x$$ and $$y$$ in $$\mathbb{R}^k$$ it is true that +$$ +\newcommand{sca}[1]{\langle #1 \rangle} +|\sca{x,y}|^2 \le \sca{x,x} \cdot \sca{y,y}, +$$ + + +\newcommand{\scalong}[1]{(#1_1,\dots,#1_k)} + +where $$\sca{\cdot,\cdot}$$ denotes the inner product $$\sca{\scalong{x}, \scalong{x}} = \sum_{i=1}^k x_i y_i$$. + +---- + +**Testing several math fonts** +$$ +p(\mathbf{m}) \sim \mathcal{N}(\mathbf{m}) e^{-\sum_{i} \beta_i m_i} +$$ + +$$ +\langle \vec{m} \rangle = +\frac{1}{Z(\vec{\beta})}\vec{m}(\mu) +\sum_{\mu\in\mathcal{G}} +e^{-\vec{\beta}\cdot\vec{m}(\mu)} +$$ + +---- + +Notice below that the `$$`-separated display math doesn't have a blank line before and after (i.e. in an actual $$\LaTeX$$ document it wouldn't be placed in a separate paragraph): + +The _characteristic polynomial_ $$\chi(\lambda)$$ of the +$$3 \times 3$$ matrix +    $$ +\left( \begin{array}{ccc} +a & b & c \\ +d & e & f \\ +g & h & i \end{array} \right) +$$ +is given by the formula +    $$ +\chi(\lambda) = \left| \begin{array}{ccc} +\lambda - a & -b & -c \\ +-d & \lambda - e & -f \\ +-g & -h & \lambda - i \end{array} \right|. +$$ + +This is a long line: $$\chi(\lambda) = a e i-a e \lambda -a f h-a i \lambda +a \lambda ^2-b d i+b d \lambda +b f g+c d h-c e g+c g \lambda -e i \lambda +e \lambda ^2+f h \lambda +i \lambda ^2-\lambda ^3$$ + +---- + +**Does it work in different MD elements?** + +# Math $$x^2$$ in heading 1 + +## Math $$x^2$$ in heading 2 + +### Math $$x^2$$ in heading 3 + +#### Math $$x^2$$ in heading 4 + +$$x_1, x_2, \dots, x_N$$ should not conflict with `_` _italics_? + +$$(f*g*h)(x)$$ should not conflict with `*` *syn***tax**? + +$$[a+b](c+d)$$ should not conflict link [syntax](#)? + +_math $$x^2$$ in emphasis_ + +**math $$x^2$$ in bold** + +[math $$x^2$$ in link](http://www.mathjax.org/) + +`math $$x^2$$ in code` + +~~math $$x^2$$ in strikethrough~~ (doesn't strike through the math) + +**In Tables** + +| Left-Aligned | Center Aligned | Right Aligned | +| :------------ |:---------------:| -----:| +| $$a+b$$ | some wordy text | $1600 | +| $$a+b$$ | some wordy text | $1600 | +| $$a+b$$ | some wordy text | $1600 | + +The following doesn't work (it only works with Pandoc) + +| Left-Aligned | Center Aligned | Right Aligned | +| :------------ |:---------------:| -----:| +| $$a+b$$ | some wordy text | $1600 | +| | $$ +A=\mathbf{A}=\underline{A}=\begin{pmatrix} +a_{11} & a_{12} & \cdots & a_{1n}\\ +a_{21} & a_{22} & \cdots & a_{2n}\\ +\vdots & \vdots & & \vdots\\ +a_{m1} & a_{m2} & \cdots & a_{mn}\\ +\end{pmatrix} = (a_{ij}) +$$ | $12 | +| | | $1 | + + +**In Image Captions** + +The `alt` string doesn't work + +![$$a^2+b^2=c^2$$](https://raw.githubusercontent.com/atom-community/markdown-preview-plus/master/imgs/mpp-full-res-invert.png) From 119a0b241ec3089dedbd6a6c6da9e6880f0646a0 Mon Sep 17 00:00:00 2001 From: Peter Mosses Date: Mon, 9 Sep 2019 22:22:22 +0200 Subject: [PATCH 3/6] Revert "Mathjax support added" This reverts commit 7220197a1f29327479acbbcdd858d1b62e6ec81e. --- _config.yml | 7 +- _includes/head.html | 12 +-- docs/configuration.md | 10 -- docs/mathjax/index.md | 59 ------------ docs/mathjax/test.md | 207 ------------------------------------------ 5 files changed, 2 insertions(+), 293 deletions(-) delete mode 100644 docs/mathjax/index.md delete mode 100644 docs/mathjax/test.md diff --git a/_config.yml b/_config.yml index c53ecc3..d12d439 100644 --- a/_config.yml +++ b/_config.yml @@ -50,10 +50,5 @@ compress_html: comments: all endings: all startings: [] - blanklines: true # required for Mathjax + blank_lines: false profile: false - -# For the Mathjax script loaded in the head of all pages with page.mathjax -mathjax: - source: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML - config: 'MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } })' diff --git a/_includes/head.html b/_includes/head.html index 322195a..eae6a5e 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -29,17 +29,7 @@ {% if site.search_enabled != false %} {% endif %} - - - - {% if page.mathjax %} - - - {% endif %} + diff --git a/docs/configuration.md b/docs/configuration.md index b3b467c..14422fd 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -89,13 +89,3 @@ See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more # e.g, UA-1234567-89 ga_tracking: UA-5555555-55 ``` - -## Mathjax - -```yaml -compress_html: - blanklines: true # required for Mathjax -mathjax: - source: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML - config: 'MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } })' -``` diff --git a/docs/mathjax/index.md b/docs/mathjax/index.md deleted file mode 100644 index 128c54b..0000000 --- a/docs/mathjax/index.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: default -title: Mathjax -nav_order: 8 -has_children: true -mathjax: true ---- - -# Mathjax - -To use [Mathjax] on a just-the-docs page: - -- include `mathjax: true` in the YAML preamble - -- enclose $$ \LaTeX $$ code in [kramdown math blocks] - -The default Mathjax options in `_config.yml` are: - -```yaml -compress_html: - blanklines: true # required for Mathjax -mathjax: - source: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML - config: 'MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } })' -``` - -Here is an example: - -$$ -\begin{align*} - & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right) - = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\ - & (x_1, \ldots, x_n) \left( \begin{array}{ccc} - \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\ - \vdots & \ddots & \vdots \\ - \phi(e_n, e_1) & \cdots & \phi(e_n, e_n) - \end{array} \right) - \left( \begin{array}{c} - y_1 \\ - \vdots \\ - y_n - \end{array} \right) -\end{align*} -$$ - -For further examples, see [this test page](test), adapted from a [test] -in [markdown-preview-plus]. - -[Mathjax]: https://www.mathjax.org - "Mathjax home page" - -[kramdown math blocks]: https://kramdown.gettalong.org/syntax.html#math-blocks - "kramdown math blocks documentation" - -[test]: https://github.com/atom-community/markdown-preview-plus/blob/master/EXAMPLE.md - "Markdown-preview-plus test file" - -[markdown-preview-plus]: https://atom.io/packages/markdown-preview-plus - "Markdown-preview-plus package page" diff --git a/docs/mathjax/test.md b/docs/mathjax/test.md deleted file mode 100644 index 450f329..0000000 --- a/docs/mathjax/test.md +++ /dev/null @@ -1,207 +0,0 @@ ---- -layout: default -title: Mathjax test -parent: Mathjax -mathjax: true ---- - -$$x$$ math at the start of the document - -Nested: $$M = \text{while e^2 $e^2$ do $c^2$ end}$$ - -**Numbered equations** - -$$ -\begin{equation} -\int_0^x \sin(x) dx -\label{eq:test} -\end{equation} -$$ - -$$\eqref{eq:test}$$ - -**Blockquotes** - -> 1. A block quote -> 2. With a list inside -> 3. With $$math$$ - -**Math environment Syntax testing** - -Inline Math should work with `$$` $$\frac{x+y}{y}$$ -but not `\(` \(\frac{x+y}{y}\) - -Use `$$` on separate lines: - -$$ -\int_{-\infty}^\infty e^{-x^2} = \sqrt{\pi} -$$ - - -Use `$$` on the same line: -$$ \frac{-b \pm \sqrt{b^2-4ac}}{2a} $$ - -Use `$$` on separate lines: - -$$ -a+b -$$ - -Use `$$` on the same line: $$E=mc^2$$ - ----- - -**Some Tex Functions** - -$$k \times k$$, $$n \times 2$$, $$2 \times n$$, $$\times$$ - -$$x \cdot y$$, $$\cdot$$ - -$$\sqrt{x^2+y^2+z^2}$$ - -$$\alpha \beta \gamma$$ - -$$ -\begin{aligned} -x\ &= y\\ -mc^2\ &= E -\end{aligned} -$$ - ----- - -**Escaped Math environments** - -In the following examples no math environments should render: - -a $5, a $10 and a \$100 Bill. - -All McScrooge sees - -\$$ - -and even more: - -\$$ - -\\[x+y\] -\\(x+y\) - -``` -$x -``` - -``` -\$ -``` - -`\$`, `\[ \]`, `$x$` - ----- - -**Testing `\newcommand`** - -For all $$x$$ and $$y$$ in $$\mathbb{R}^k$$ it is true that -$$ -\newcommand{sca}[1]{\langle #1 \rangle} -|\sca{x,y}|^2 \le \sca{x,x} \cdot \sca{y,y}, -$$ - - -\newcommand{\scalong}[1]{(#1_1,\dots,#1_k)} - -where $$\sca{\cdot,\cdot}$$ denotes the inner product $$\sca{\scalong{x}, \scalong{x}} = \sum_{i=1}^k x_i y_i$$. - ----- - -**Testing several math fonts** -$$ -p(\mathbf{m}) \sim \mathcal{N}(\mathbf{m}) e^{-\sum_{i} \beta_i m_i} -$$ - -$$ -\langle \vec{m} \rangle = -\frac{1}{Z(\vec{\beta})}\vec{m}(\mu) -\sum_{\mu\in\mathcal{G}} -e^{-\vec{\beta}\cdot\vec{m}(\mu)} -$$ - ----- - -Notice below that the `$$`-separated display math doesn't have a blank line before and after (i.e. in an actual $$\LaTeX$$ document it wouldn't be placed in a separate paragraph): - -The _characteristic polynomial_ $$\chi(\lambda)$$ of the -$$3 \times 3$$ matrix -    $$ -\left( \begin{array}{ccc} -a & b & c \\ -d & e & f \\ -g & h & i \end{array} \right) -$$ -is given by the formula -    $$ -\chi(\lambda) = \left| \begin{array}{ccc} -\lambda - a & -b & -c \\ --d & \lambda - e & -f \\ --g & -h & \lambda - i \end{array} \right|. -$$ - -This is a long line: $$\chi(\lambda) = a e i-a e \lambda -a f h-a i \lambda +a \lambda ^2-b d i+b d \lambda +b f g+c d h-c e g+c g \lambda -e i \lambda +e \lambda ^2+f h \lambda +i \lambda ^2-\lambda ^3$$ - ----- - -**Does it work in different MD elements?** - -# Math $$x^2$$ in heading 1 - -## Math $$x^2$$ in heading 2 - -### Math $$x^2$$ in heading 3 - -#### Math $$x^2$$ in heading 4 - -$$x_1, x_2, \dots, x_N$$ should not conflict with `_` _italics_? - -$$(f*g*h)(x)$$ should not conflict with `*` *syn***tax**? - -$$[a+b](c+d)$$ should not conflict link [syntax](#)? - -_math $$x^2$$ in emphasis_ - -**math $$x^2$$ in bold** - -[math $$x^2$$ in link](http://www.mathjax.org/) - -`math $$x^2$$ in code` - -~~math $$x^2$$ in strikethrough~~ (doesn't strike through the math) - -**In Tables** - -| Left-Aligned | Center Aligned | Right Aligned | -| :------------ |:---------------:| -----:| -| $$a+b$$ | some wordy text | $1600 | -| $$a+b$$ | some wordy text | $1600 | -| $$a+b$$ | some wordy text | $1600 | - -The following doesn't work (it only works with Pandoc) - -| Left-Aligned | Center Aligned | Right Aligned | -| :------------ |:---------------:| -----:| -| $$a+b$$ | some wordy text | $1600 | -| | $$ -A=\mathbf{A}=\underline{A}=\begin{pmatrix} -a_{11} & a_{12} & \cdots & a_{1n}\\ -a_{21} & a_{22} & \cdots & a_{2n}\\ -\vdots & \vdots & & \vdots\\ -a_{m1} & a_{m2} & \cdots & a_{mn}\\ -\end{pmatrix} = (a_{ij}) -$$ | $12 | -| | | $1 | - - -**In Image Captions** - -The `alt` string doesn't work - -![$$a^2+b^2=c^2$$](https://raw.githubusercontent.com/atom-community/markdown-preview-plus/master/imgs/mpp-full-res-invert.png) From a7285b9e305d0ba879f1ea753ff4b0a3282df6c0 Mon Sep 17 00:00:00 2001 From: Peter Mosses Date: Mon, 9 Sep 2019 22:26:32 +0200 Subject: [PATCH 4/6] Replace `blank_lines` by `blanklines`. --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index d12d439..d34af7c 100644 --- a/_config.yml +++ b/_config.yml @@ -50,5 +50,5 @@ compress_html: comments: all endings: all startings: [] - blank_lines: false + blanklines: false profile: false From 7804642c50c5cb45750d8e186206e5f7efbf1c21 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Mon, 9 Sep 2019 16:32:24 -0400 Subject: [PATCH 5/6] Update search.md --- docs/search.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/search.md b/docs/search.md index 134e399..1a627d2 100644 --- a/docs/search.md +++ b/docs/search.md @@ -59,6 +59,15 @@ In your site's `_config.yml`, enable search: search_enabled: true ``` +The default is for hyphens to separate tokens in search terms: +`gem-based` is equivalent to `gem based`, matching either word. +To allow search for hyphenated words: + +```yaml +# Set the search token separator +search_tokenizer_separator: /[\s/]+/ +``` + ## Hiding pages from search Sometimes you might have a page that you don't want to be indexed for the search nor to show up in search results, e.g, a 404 page. To exclude a page from search, add the `search_exclude: true` parameter to the page's YAML front matter: From 3ae06cd59b8cac45d04233693c26755c0da6a815 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Mon, 9 Sep 2019 16:32:53 -0400 Subject: [PATCH 6/6] Update search.md --- docs/search.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/search.md b/docs/search.md index 1a627d2..74b398f 100644 --- a/docs/search.md +++ b/docs/search.md @@ -59,12 +59,12 @@ In your site's `_config.yml`, enable search: search_enabled: true ``` -The default is for hyphens to separate tokens in search terms: -`gem-based` is equivalent to `gem based`, matching either word. -To allow search for hyphenated words: +The default is for hyphens to separate tokens in search terms: +`gem-based` is equivalent to `gem based`, matching either word. +To allow search for hyphenated words: -```yaml -# Set the search token separator +```yaml +# Set the search token separator search_tokenizer_separator: /[\s/]+/ ```