summaryrefslogtreecommitdiff
path: root/search/elasticlunr/README
diff options
context:
space:
mode:
Diffstat (limited to 'search/elasticlunr/README')
-rw-r--r--search/elasticlunr/README24
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.