UNPKG

480 BJavaScriptView Raw
1#!/usr/bin/env node
2import { HugoIndexer } from './index.js'
3
4if (process.argv.indexOf("--help") != -1) {
5 // help
6 const help = `
7Creates lunr index file for multilingual hugo static site
8
9Usage:
10
11 hugo-lunr-ml [arguments]
12 or
13 ./module_path/index.js
14
15Arguments:
16
17 -i set input path to parse (default: content/**)
18 -o set output index file path (default: /public/search-index.json')
19`
20 console.log(help)
21} else {
22 new HugoIndexer().createIndex()
23}
24
25