diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fb6cab..c0f7c6d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Enhancements * Update jQuery to version `3.3.1`. [#1491](https://github.com/mmistakes/minimal-mistakes/issues/1491) +* Add link to jekyll-algolia's `files_to_exclude` documentation. ### Bug Fixes diff --git a/docs/_docs/05-configuration.md b/docs/_docs/05-configuration.md index 81508915..8251ec60 100644 --- a/docs/_docs/05-configuration.md +++ b/docs/_docs/05-configuration.md @@ -2,7 +2,7 @@ title: "Configuration" permalink: /docs/configuration/ excerpt: "Settings for configuring and customizing the theme." -last_modified_at: 2018-02-16T12:49:45-05:00 +last_modified_at: 2018-02-19T08:09:39-05:00 toc: true --- @@ -530,6 +530,9 @@ For faster and more relevant search ([see demo](https://mmistakes.github.io/mini To use the Algolia search with GitHub Pages hosted sites follow [this deployment guide](https://community.algolia.com/jekyll-algolia/github-pages.html). Or this guide for [deploying on Netlify](https://community.algolia.com/jekyll-algolia/netlify.html). +**Note:** The Jekyll Algolia plugin can be configured in several ways. Be sure to check out [their full documentation](https://community.algolia.com/jekyll-algolia/options.html "Algolia configuration") on how to exclude files and other valuable settings. +{: .notice--info} + ### SEO, Social Sharing, and Analytics Settings All optional, but a good idea to take the time setting up to improve SEO and links shared from the site. diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index 583f17b1..2d855de4 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: 2018-02-16T15:18:36-05:00 +last_modified_at: 2018-02-19T08:07:26-05:00 toc: true --- @@ -13,6 +13,7 @@ toc: true ### Enhancements * Update jQuery to version `3.3.1`. [#1491](https://github.com/mmistakes/minimal-mistakes/issues/1491) +* Add link to jekyll-algolia's `files_to_exclude` documentation. ### Bug Fixes diff --git a/docs/_posts/2017-11-28-post-exclude-search.md b/docs/_posts/2017-11-28-post-exclude-search.md index 742bcb23..03f0d056 100644 --- a/docs/_posts/2017-11-28-post-exclude-search.md +++ b/docs/_posts/2017-11-28-post-exclude-search.md @@ -3,10 +3,27 @@ title: "Exclude Post from Search Index" search: false categories: - Jekyll +last_modified_at: 2018-02-19T08:06:00-05:00 --- This post should not appear in the search index because it has the following YAML Front Matter: ```yaml search: false +``` + +**Note:** `search: false` only works to exclude post's when using Lunr as a search provider. +{: .notice--info} + +To exclude files when using Algolia as a search provider add an array to `algolia.files_to_exclude` in your `_config.yml`. For more configuration options be sure to check their [full documentation](https://community.algolia.com/jekyll-algolia/options.html). + +```yaml +algolia: + # Exclude more files from indexing + files_to_exclude: + - index.html + - index.md + - excluded-file.html + - _posts/2017-11-28-post-exclude-search.md + - subdirectory/*.html ``` \ No newline at end of file diff --git a/test/_posts/2017-11-28-post-exclude-search.md b/test/_posts/2017-11-28-post-exclude-search.md index 742bcb23..907343a8 100644 --- a/test/_posts/2017-11-28-post-exclude-search.md +++ b/test/_posts/2017-11-28-post-exclude-search.md @@ -3,10 +3,27 @@ title: "Exclude Post from Search Index" search: false categories: - Jekyll +last_modified_at: 2018-02-19T08:05:34-05:00 --- This post should not appear in the search index because it has the following YAML Front Matter: ```yaml search: false +``` + +**Note:** `search: false` only works to exclude post's when using **Lunr** as a search provider. +{: .notice--info} + +To exclude files when using **Algolia** as a search provider add an array to `algolia.files_to_exclude` in your `_config.yml`. For more configuration options be sure to check their [full documentation](https://community.algolia.com/jekyll-algolia/options.html). + +```yaml +algolia: + # Exclude more files from indexing + files_to_exclude: + - index.html + - index.md + - excluded-file.html + - _posts/2017-11-28-post-exclude-search.md + - subdirectory/*.html ``` \ No newline at end of file