diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-04-27 20:45:12 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-04-27 20:45:12 +0200 |
commit | 74087a15b63dbc062e1c8a785917f44cda5f14c7 (patch) | |
tree | bd20677420b33aae27bb3ba6065c1757880caecf /search/elasticlunr/README | |
parent | e372ee22511a0e084b7957316909705bf9628d01 (diff) | |
download | www-andreasbaumann-cc-74087a15b63dbc062e1c8a785917f44cda5f14c7.tar.gz www-andreasbaumann-cc-74087a15b63dbc062e1c8a785917f44cda5f14c7.tar.bz2 |
better GDPR page
Diffstat (limited to 'search/elasticlunr/README')
-rw-r--r-- | search/elasticlunr/README | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/search/elasticlunr/README b/search/elasticlunr/README new file mode 100644 index 0000000..c1c318c --- /dev/null +++ b/search/elasticlunr/README @@ -0,0 +1,24 @@ +# Search index with elasticlunr + +# 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) + +# use posts.json in a | node create_index.js pipeline +# -> results in posts_index.json + +# add as static contents to hugo site + +# load from JS search code on demand (first query) if possible, +# if small, do it immediatelly when loading the search widget. |