2 minutes
Deploying the New Hugo Site to Netlify
Pre requisites
A static site, like Hugo build and update and added to a remote repo
Ensure to include the ‘theme’ used will be pushed into the remote repo as well.
Edit user settings
Go to
https://app.netlify.com/user/settings
update personal settings
add access to repos under 'connected accounts'
Create new site
Go to
https://app.netlify.com/teams/fxlinden/sites
Go through the motion adding the codecommitters.com repo you’re using
Ensure to set the base url to https
in the file
config.toml
change the parameter ‘baseURL’ to reflect ‘https’
baseURL = "https://codecommitters.com/"
DNS records
Go to your favorite DNS procoder
First, add an A record to the zone pointig to the Netlify loadbalancer
A @ 104.198.14.52
Next add a CNAME record for www pointing to your site namen
www CNAME condescending-wing-5e73d8.netlify.app
Note: the DNS name generated for the example site is “condescending-wing-5e73d8.netlify.app”. The DNS name given can be changed in the Netlify configuration.
Rebuild your site
When a file has been changed and the site has been verified locally the update can be pushed to Netlify. Commit you file fisrt locally,
git commit my-newpost.md -m "updated my-newpost file"
to push it to the remote repo which will start the build on Netlify
git push
Check Netlify deploy page
Check the progress and state of your build on the Netlify deploy pages
https://app.netlify.com/teams/fxlinden/builds/
Check on this page the ‘Builds’ section and find the last build. Did it complete?
When you hit the line with information about the build state a button “Go to deploy details” will appear. Follow that link and check the “Deploy summary”
Scroll down to review the “Deploy log”
2:19:39 PM: Build ready to start
2:19:41 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
2:19:41 PM: build-image tag: v3.4.1
2:19:41 PM: buildbot version: cdc66b02d86506251d3343610a77385376c8c035
2:19:41 PM: Fetching cached dependencies
2:19:41 PM: Starting to download cache of 78.6MB
2:19:42 PM: Finished downloading cache in 1.026557378s
2:19:42 PM: Starting to extract cache
2:19:45 PM: Finished extracting cache in 2.683308105s
2:19:45 PM: Finished fetching cache in 3.755689891
...
On the “Deploy log” line a “Preview” button is shown which will take you to a preview of the resulting web site.
348 Words
2024-02-18 00:00