-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add search functionality? #163
Labels
Milestone
Comments
It would be awesome!🎉 |
Guess we can do it then. |
@dawnow Hmmm, not sure, as that issue is lack of description... Anyway, maybe we can close it when we close this. 🤔 |
Ok, I'm generalizing the code, will create a pull request shortly. |
Pull request is #165. |
ulmefors
pushed a commit
to ulmefors/hugo-theme-meme
that referenced
this issue
Nov 22, 2020
Fixes reuixiy#163 * feat: Added search capability via lunr * doc: Fixed typo * chore: Updated resource files of the example site * chore: Remove unnecessary div wrapping search results * chore: Reverted change of the config documentation * chore: Ordered config entries correctly * fix: Update document title when displaying search results * fix: Handle a 404 error when downloading search index * Use menu variable for icon * Adjust search icon's style * fix: Make back button work for restoring previous page state * fix: Respect search state even when coming back from another page or site * fix: Support non-English languages * chore: port config.toml to zh-cn * i18n: add zh, pt-br translations * Increase `postWidth` and `listWidth` to `39em` Otherwise search box will warp to a new line. * Update screenshots * Update resources * fix: Update URL when searching Co-authored-by: reuixiy <reuixiy@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would it make sense to contribute the search functionality from palant.info? Hugo website recommends hugo-lunr for lunr.js integration which is an unnecessarily complicated way to do it and will fail in some scenarios. This functionality can be easily integrated into a theme, with lunr.js script as the only external dependency. The search itself will work on the client side then, without any server-side support (search index generated as a JSON file by Hugo itself).
The text was updated successfully, but these errors were encountered: