Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

honkit-plugin-elasticsearch

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

honkit-plugin-elasticsearch

GitBook search plugin for Elasticsearch

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
115
decreased by-19.01%
Maintainers
1
Weekly downloads
 
Created
Source

honkit-plugin-elasticsearch

This plugin provides a backend for the search plugin.

Usage

Gitbook comes with default search option. In order to use this plugin, need to disable lunr plugins and add elasticsearch as bellow:

"plugins": [
    "-lunr",
    "elasticsearch"
  ]

add the following plugin configurations in book.json

{
   "pluginsConfig": {
     "elasticsearch": {
       "host" : "http://your-elasticsearch:9200",
       "index" : "your-index",
       "apiKey" : "your-apikey",
       "maxResults" : 30,
     }
   }
}

Building your gitbook will generate a search index file in _book directory. Insert the index file into your elasticsearch.

curl -XPOST "http://your-elasticsearch:9200/your-index/_bulk" -H 'Content-Type: application/json' --data-binary @_book/search_index.json

Adding keywords to a page

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

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

---

# My Page

This page will rank better if we search 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 is not indexed in Elasticsearch.

FAQs

Package last updated on 01 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc