-
Notifications
You must be signed in to change notification settings - Fork 574
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
Search page #888
Search page #888
Conversation
The search feature would be helpful because I often find myself grepping through this git repository to find specific blog pages. |
Thank you for the feedback! |
Interesting! I'm in favor of adding a search. How does this work? Is it a pure-JS search? That's pretty amazing if so. |
@jsha thank you! Hugo's help page https://gohugo.io/tools/search/ was really useful, and a special thanks to @sebz's and @eddiewebb's gists is needed 😄 Technically speaking:
So yes, 100% js front-end, with no external dependency. The json file is only ~1.5Mo for English (so with all blog posts), less than 500ko on the network with the compression, which is reasonable (but still require a waiting indicator) |
Uses do_not_search from letsencrypt#903 to: - Remove the search page from search engines - In the search page result, to not display do_not_index pages
Just a proof of concept, to discuss about it, see if it may be useful.
https://deploy-preview-888--letsencrypt.netlify.com/search/
And for the 404: