Deploying a Hugo blog
·157 words·1 min
Development
Author
Jacky Van
Deployment #
Build public directory
#
hugo
Deploy draft Netlify version #
netlify deploy
Netlify will ask for a publish directory, we’ll be using the public directory we built in the previous step
Once the deploy is complete, you’ll see a link to a preview. Confirm that it looks as you’d expect, and then you’re ready to deploy a production version
Deploy production Netlify version #
netlify deploy --prod
Setting up custom domain on Netlify #
Add a domain through the Netlify site settings. In this case:
blog.jackyvan.com
Delegate subdomain (blog.jackyvan.com) to Netlify’s managed DNS
#
On the Netlify domain settings for the site, find the prompt to delegate the subdomain to Netlify DNS. The end of this flow on Netlify’s UI should return a set of name servers.
Go to the domain registrar that you have the domain with. Add in a NS record for each name server.
Type: NS Record
Host: blog
Value: <NAME SERVER>