diff options
Diffstat (limited to 'search/elasticlunr/README')
-rw-r--r-- | search/elasticlunr/README | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/search/elasticlunr/README b/search/elasticlunr/README index c1c318c..2295f36 100644 --- a/search/elasticlunr/README +++ b/search/elasticlunr/README @@ -3,20 +3,15 @@ # Create a search index which can be served statically along the # static HTML pages to staticlunr.js. -# YAML/TOML/JSON and Markdown: -# remarshal (https://github.com/dbohdan/remarshal) -# pandoc (http://pandoc.org/) - -# create XML and clean up some problematic constructs -./create_xml.sh > posts.xml -sed -i 's/xlink:href/href/g' posts.xml -sed -i 's/ xml:id="[^"]\+"//g' posts.xml -xmllint -noout posts.xml - -# convert XML to JSON (at least the relevant fields for the index) +# generate JSON dynamically with a JSON output generator, +# see https://halfelf.org/2017/hugos-making-json/ +curl http://localhost:1313/index.json > posts.json +#curl http://www.andreasbaumann.cc/index.json > posts.json +# we need nodejs and npm # use posts.json in a | node create_index.js pipeline # -> results in posts_index.json +npm install JSONStream event-stream # add as static contents to hugo site |