Its up to you how you organize your project, but as I am a Go Language developer and Hugo is built using Go I have created a folder for this project here:
This will create the skeleton for your new Hugo site.
## Choosing a theme
First I headed over to the themes showcase for hugo here: [Hugo Themes](http://themes.gohugo.io/). This has screenshots and links to demo sites for each theme.
I chose [hyde-x](http://themes.gohugo.io/hyde-x/) for my blog.
In the root of your project there is a file called `config.toml` that you need to update to configure your site. You can look at [my configuration](https://github.com/softinio/softinio.com/blob/master/config.toml) to get an idea of the things you can set. For your theme specific settings of course look at the github repo for your theme's readme for detailsi (e.g. for my chosen theme: [hyde-x documentation](https://github.com/zyro/hyde-x/blob/master/README.md)).
You can get Hugo to automatically create the above front matter for you for each content type. These are called `archetypes`. If you look at the `archetypes` subdirectory of my project there are two archetypes `default.md` and `page.md`. Any content created that is of type `page` will have the contents of `page.md` added to its header. Any other content type will have the content of `default.md` added to its header.
So this will be added to the top of every content of type page that I add. Of course I will have to edit this template for each content with that contents specific meta data.
The main difference between my two different content types is that the `page.md` content type has `menu = "main"` this tells hugo that this content is not a blog post and it should be added to the left column of my website below my name as a link.
So to migrate my blog posts from pelican to hugo I used to above command to create a post with same file name as I had in pelican, copy and pasted the contents of each file from my pelican project to my hugo project. Note that of course I did not copy the front matter of my pelican posts across. Instead I updated the hugo front matter with the same meta data as I had in pelican manually. I repeated this process for my pages too.
## Permalinks
My permalinks structure for my old pelican based blog was:
I could have kept it the same so that the URL to my existing content moving from Pelican to Hugo would not change, but I prefered to move forward with it this way. This is a personal choice of course.
For more details on permalinks have a look at the [Hugo documentation on permalinks](http://gohugo.io/extras/permalinks/).
## GitHub
By this stage I had migrated all my content to hugo and had setup my site. All tested locally. So to get ready for deployment I [created a new GitHub repo](https://help.github.com/articles/create-a-repo/) for it and pushed my code to it:
- The bucket I named `www.softinio.com` and set it up for static website hosting by following this [Amazon Document](https://docs.aws.amazon.com/AmazonS3/latest/dev/HowDoIWebsiteConfiguration.html)
When I created the `www.softinio.com` bucket I also clicked `properties` and selected the `permissions` section. Here I edited the bucket policy and added:
## Moving my domains DNS management to Amazon AWS Route 53
I then moved my domain's DNS management to [Amazon AWS Route 53 service](https://aws.amazon.com/route53/) for convenience.
I followed the steps in this [Amazon document](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/creating-migrating.html) to move my domain's DNS management.
## Creating a User on Amazon AWS to use for deployment
We need to create a user on Amazon AWS to use for deployments to the S3 bucket we created. To do this log into your Amazon AWS console and select `Identity & Access Management`, then select `Users` and then select `Create New Users`.
You are all set now to deploy your hugo website. Commit your changes and push to the GitHub repo you created and your website will be deployed to S3 for you automatically.
From now on when ever you make any changes to your site, as soon as you push to your GitHub repo , it will build and deploy your changes to Amazon S3.
## Conclusion
I am really enjoying using Hugo for my blog and having it deploy automatically when I push a change to GitHub. My workflow is a lot simpler now making it easier for me to write and publish my blogs.
You may ask why I moved from the Python based Pelican to Hugo, well I simply wanted to try something new. I think both Pelican and Hugo are great at what they do so you can't go wrong with either.
If I had to choose between them, I would choose Hugo for the more modern approach and excellent documentation.