Search Exclusions

To exclude a page from the search index, add the exclude_from_search_index: true to the frontmatter of the page.

For example, Ruby Static Pro does not include the blog index page (located at /blog) in the seach index.

Why?

Becuase the individual blog posts are the valuable resources that someone is searching for. They probably do not want to land on page 3 of the blog and then find the article and click on it. They want to be taken directly to the article. Thereore, Ruby Static Pro disables the blog index from showing up in the search index.

Here’s what the blog.html.erb frontmatter looks like in order to exclude it from search:

---
title: Blog 
pageable: true
exclude_from_search_index: true
---

When exclude_from_search_index: true is present, the /source/search_data.json.erb file will exclude it from the search results.

Just add that key to any page that you do not want included in the search index.