bevy-website
bevy-website copied to clipboard
Add search functionality using Pagefind
This PR adds search functionality using Pagefind Rust based library. The search index built by Pagefind is generated based on the final website HTML files. Because of that I had to change the deploy action; now building with Zola, creating the search index and deploying are different steps.
For reviewers
You'll need to generate the Pagefind index, follow these instructions: https://github.com/doup/bevy-website/tree/pagefind-search?tab=readme-ov-file#local-development
Closes #1204.
Deploy Settings
I had to use these settings to deploy with the new modified deploy action. Fine-grained PAT Permissions:
Also, had to add my branch pagefind-search to the repo Settings > Environments > Configure "github-pages" > Deployment branches and tags. So, main probably needs to be there.
Thanks for the review @krunchington π I'll ask for a new one once I fix the issues and finish the CI part.
New changes look good!
search button doesn't work for me
https://github.com/user-attachments/assets/cf4982dc-09eb-43b3-9830-4fdf7438f4b3
PS C:\Users\BenjaminBrienen\source\bevy-website> zola serve
Building site...
Warning: Highlight language shell not found in learn/migration-guides/0.11-to-0.12.md
Warning: Highlight language ron not found
Warning: Highlight language shell not found in learn/migration-guides/0.14-to-0.15.md
Warning: Highlight language shell not found in learn/migration-guides/0.14-to-0.15.md
Warning: Highlight language shell not found in learn/migration-guides/0.14-to-0.15.md
Warning: Highlight language shell not found in learn/migration-guides/0.14-to-0.15.md
Warning: Highlight language ron not found in learn/migration-guides/0.14-to-0.15.md
Warning: Highlight language ron not found in learn/migration-guides/0.14-to-0.15.md
Checking all internal links with anchors.
> Successfully checked 32 internal link(s) with anchors.
-> Creating 123 pages (0 orphan) and 35 sections
Done in 3.8s.
Listening for changes in \\?\C:\Users\BenjaminBrienen\source\bevy-website\{config.toml,content,sass,static,templates}
Press Ctrl+C to stop
Web server is available at http://127.0.0.1:1111 (bound to 127.0.0.1:1111)
@BenjaminBrienen have you generated the Pagefind index? You'll need to follow these steps: https://github.com/doup/bevy-website/tree/pagefind-search?tab=readme-ov-file#local-development
Sorry, my bad, I forgot to mention itβ¦ π