Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

GitbookIO/plugin-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d9dac61 · Jul 1, 2016

History

66 Commits
Apr 19, 2016
Apr 20, 2016
Apr 19, 2016
Apr 7, 2016
Oct 13, 2015
Apr 14, 2016
Oct 5, 2015
Jul 1, 2016
Apr 14, 2016
Apr 20, 2016

Repository files navigation

search

This plugin is a default plugin for GitBook, it adds an interactive search bar to your book.

This plugin is backend agnostic.

Disable this plugin

This is a default plugin and it can be disabled using a book.json configuration:

{
    plugins: ["-search"]
}

Backends

Backend Plugin Name Description
Lunr lunr Index the content into a local/offlien index
Algolia algolia Index the content in Algolia

Search options

Most backends for the plugin-search will support a range of common configuration listed below. You should check the description of each backend in case some do not support some options.

Adding keywords to a page

You can specify explicit keywords for any page. When searching for these keywords, the page will should rank higher in the results.

---
search:
    keywords: ['keyword1', 'keyword2', 'etc.']
---

# My Page

This page should be among the first search results for "keyword1".

Disabling indexing of a page

You can disable the indexing of a specific page by adding a YAML header to the page:

---
search: false
---

# My Page

This page should not appear in the search results.