Developer Programs

Learn

Docs

Building Your Site

Getting Started > Building Your Site
hugo
hugo

To build your site, change directory into your Hugo site folder in a terminal window and enter hugo.

When you build your site for deployment, your site’s search index must be built by the Pagefind utility. This starter template site’s package.json file includes an index script that runs the npx pagefind --source 'public' command. This means you can re-index your site’s search catalog using npm run index.

This starter template calls the site search index script from its build script after it calls hugo to build the site. So to ensure that your site is built and its search index gets updated, use the npm run build script whenever you need to build your site for production.

Next topic: Setting Up Analytics for Your Site

Support options
Have questions on this topic?
Join the jhDocs team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.

Did this page help you?

Last updated Fri Dec 19 2025