Socket
Socket
Sign inDemoInstall

hugo-lunr-indexer

Package Overview
Dependencies
23
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hugo-lunr-indexer

Generate Lunr indices for Hugo static sites by parsing front matter.


Version published
Weekly downloads
20K
increased by85.91%
Maintainers
1
Install size
1.29 MB
Created
Weekly downloads
 

Readme

Source

Hugo-Lunr-Indexer (HLI)

NPM release Build Status License

Generate Lunr indexes for Hugo static sites by parsing front matter.



Installation

Install with npm
$ npm install hugo-lunr-indexer

Usage

CLI
###################
# Default options #
###################

$ hli \                      # hli -> hugo-lunr-indexer
  -i "content/**" \          # input (path)
  -o "public/lunr.json" \    # output (path)
  -l "toml"                  # language (toml | yaml)
  -d "+++"                   # delimiter (toml: +++ | yaml: ---)
NPM Scripts
...
"scripts": {
  "index": "hli -i 'content/posts/**' -o 'public/indices/lunr.json' -l 'yaml' -d '---'"
},
...
$ npm run index
API
var hli = require('hugo-lunr-indexer');
var Indexer = new hli();
Indexer.setInput('content/blog/**');
Indexer.setOutput('public/static/index.json');
Indexer.setLanguage('toml');
Indexer.setDelimiter('---');
Indexer.index();

Sites using hugo-lunr-indexer

License

Apache-2.0 © Travis Clarke

Keywords

FAQs

Last updated on 09 Jun 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc