Indexing a hugo site using pagefind
static all the way down
- tags
- hugo
- pagefind
Contents
Build the site
Once you've built site, using `hugo` in our case, we need to run `pagefind` to index the output:
|
|
This will create a _pagefind
directory in your public
folder which has
the index and the code to display the search results.
Adding the front end
|
|
I hide this box by default, but you can add some straigh JavaScript to toggle the search container.
|
|
Github build actions
You can look at my Github Workflow to build the site here, but add you
really need to do is run npx pagefind --source "public"
after you
generate your site:
|
|
References
Previously
Next