[Hugo] You must run npx pagefind everytime you build if you want to index your new posts

puzzle creative RJtZiTbAy c unsplash scaled

1. Build your Hugo site (create/update /public):

hugo

This builds your static site in the public/ directory.

2. Run Pagefind to index the site:

npx pagefind --site public

This command creates the /public/pagefind/ folder, which contains the JavaScript and CSS needed for the search UI.

Important:

You must run both hugo and npx pagefind –site public every time you rebuild your site, every time you add, edit, or remove content in your Hugo site that you want to appear in search results, before deploying or serving from the /public directory.

Genx

in

About The Author

Genx

Born in 1982 in Japan, he is a Japanese beatmaker and music producer who produces experimental hiphop beats. He is the owner of Genx Records. Because he grew up internationally, he understands English. His hobbies are muscle training, artwork creation, website customization, and web3. He also loves Korea.

Website: genxrecords.xyz

Share This Post:


Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

eleven + 4 =

Webmention: Have you posted a response to this article? Let me know the URL: