Deploying This Blog
Prerequisit
You have created a website using Hugo following my first posting.
Detailed steps
If you are using a cloud provider to host your content serverless e.g. AWS S3 you can simply configure a deployment configuration and run
hugo deploy
see details here: https://gohugo.io/hosting-and-deployment/hugo-deploy/
Be careful when u are using AWS CloudFront for distribution or security reasons.
There is a problem to load the index.html files located in subdirectories.
To solve this problem I had to deploy a Lambda@Edge function.
Find more details here: https://aws.amazon.com/blogs/compute/implementing-default-directory-indexes-in-amazon-s3-backed-amazon-cloudfront-origins-using-lambdaedge/
Of cause you can also simple copy your public folder gernerated by Hugo to your webserver 😉
Deploying new content
Create new empty blog post
hugo new posts/another-posting.md
Edit this file using your favorite editor. Than compile and preview it.
hugo
hugo server
Finaly publish your new post
hugo deploy --dryRun
hugo deploy
That’s it