From 550da551e4ecda35454181b9f6838498337301aa Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 28 Nov 2017 08:43:32 -0500 Subject: [PATCH] Document how to exclude pages/posts from search index ref #1369 --- CHANGELOG.md | 1 + docs/_docs/10-layouts.md | 10 +++++++++- docs/_docs/18-history.md | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b973797c825..ee5741e5d51c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Remove Alexa.com verification due to retiring of "[Claim Your Site](https://support.alexa.com/hc/en-us/articles/219135887)" feature. [#1350](https://github.com/mmistakes/minimal-mistakes/issues/1350) * Disable analytics in `development` environment. [#1362](https://github.com/mmistakes/minimal-mistakes/pull/1362) * Disable comments in `development` environment. [#1363](https://github.com/mmistakes/minimal-mistakes/pull/1363) +* Exclude specific pages/posts from search index by adding `search: false` to the YAML Front Matter. [#1369](https://github.com/mmistakes/minimal-mistakes/pull/1369) ### Bug Fixes diff --git a/docs/_docs/10-layouts.md b/docs/_docs/10-layouts.md index a2361fd8f4ec..cfbe09b6d53d 100644 --- a/docs/_docs/10-layouts.md +++ b/docs/_docs/10-layouts.md @@ -7,7 +7,7 @@ single_layout_gallery: alt: "single layout with header example" - image_path: /assets/images/mm-layout-single-meta.png alt: "single layout with comments and related posts" -last_modified_at: 2017-11-15T15:01:40-05:00 +last_modified_at: 2017-11-28T08:42:54-05:00 toc: true toc_label: "Included Layouts" toc_icon: "columns" @@ -275,6 +275,14 @@ A page with a search form. Add `layout: search` to the YAML Front Matter similar ![search page layout example]({{ "/assets/images/search-layout-example.png" | absolute_url }}) +### Exclusions + +If you would like to exclude specific pages/posts from the search index set the search flag to `false` in the YAML Front Matter for the page/post. + +```yaml +search: false +``` + **ProTip:** Add a link to this page in the masthead navigation. {: .notice--info} diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index 06859b5e7ea3..caebc3c694af 100644 --- a/docs/_docs/18-history.md +++ b/docs/_docs/18-history.md @@ -4,7 +4,7 @@ permalink: /docs/history/ excerpt: "Change log of enhancements and bug fixes made to the theme." sidebar: nav: docs -last_modified_at: 2017-11-27T12:39:16-05:00 +last_modified_at: 2017-11-28T08:41:19-05:00 toc: true --- @@ -16,6 +16,7 @@ toc: true * Remove Alexa.com verification due to retiring of "[Claim Your Site](https://support.alexa.com/hc/en-us/articles/219135887)" feature. [#1350](https://github.com/mmistakes/minimal-mistakes/issues/1350) * Disable analytics in `development` environment. [#1362](https://github.com/mmistakes/minimal-mistakes/pull/1362) * Disable comments in `development` environment. [#1363](https://github.com/mmistakes/minimal-mistakes/pull/1363) +* Exclude specific pages/posts from search index by adding `search: false` to the YAML Front Matter. [#1369](https://github.com/mmistakes/minimal-mistakes/pull/1369) ### Bug Fixes