-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON output #214
Comments
in papermod, index json looks like
and the content is stripped out of HTML and escaped. |
stork remains appealing (esp. basic styling makes sense) also it does its own base indexing (though one could provide a self-defined one: jameslittle230/stork#355) would be good to make it work... |
JSON output (or at least something like "plain text" output) would still be useful though even for Stork. JSON probably makes the most sense and could have all local vars as string repr (some might be pretty damn ugly so maybe can just do that for |
Explore facilitating JSON output for search indexes
Hugo allows JSON output, a bit unclear what Fuse.js needs but should have a look at https://github.com/adityatelange/hugo-PaperMod/blob/4a924cef54081b61530a30bd69d442ae95f16561/layouts/_default/index.json#L4 basically generate a big
index.json
file and use fuse to go through it.search code:
https://github.com/adityatelange/hugo-PaperMod/blob/4a924cef54081b61530a30bd69d442ae95f16561/assets/js/fastsearch.js
linker
https://github.com/adityatelange/hugo-PaperMod/blob/4a924cef54081b61530a30bd69d442ae95f16561/layouts/partials/head.html#L79
discussion fuse static: https://gummibeer.dev/blog/2021/static-search-with-fusejs/
https://ben.land/post/2021/12/02/hugo-search-functionality/
https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae?permalink_comment_id=3393703
a somewhat easier to read generator: https://github.com/matcornic/hugo-theme-learn/blob/master/layouts/index.json
The text was updated successfully, but these errors were encountered: