1 |
|
2 | import { HugoIndexer } from './index.js'
|
3 |
|
4 | if (process.argv.indexOf("--help") != -1) {
|
5 | // help
|
6 | const help = `
|
7 | Creates lunr index file for multilingual hugo static site
|
8 |
|
9 | Usage:
|
10 |
|
11 | hugo-lunr-ml [arguments]
|
12 | or
|
13 | ./module_path/index.js
|
14 |
|
15 | Arguments:
|
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 |
|