dgrigg / hugo-lunr

Node module for creating lunr.js search indexes for static Hugo sites
71 stars 18 forks source link

Basic set language support #6

Closed clarketm closed 5 years ago

clarketm commented 7 years ago

Allow the user to set matter language (toml or yaml).

Usage:

CLI flag:
hugo-lunr -l toml  # default
hugo-lunr -l yaml
API:
var hugolunr = require('../');
var indexer = new hugolunr();
indexer.setInput('content/faq/**');
indexer.setOutput('public/faq.json');
indexer.setLanguage('toml');
indexer.index(); 
# ... OR using index()
indexer.index('content/faq/**', 'public/faq.json', 'yaml'); 
clarketm commented 5 years ago

Closing. hugo-lunr-indexer does this and more.