Create Blog With HUGO
Before create your blog, make sure you have these steps completed:
-
You have Git 2.8 or greater. How To Install Git on Ubuntu 16.04 LTS
-
You have a GitHub account. GitHub
-
You have HUGO installed. Install HUGO on Debian and Ubuntu
-
Create Site or blog to publish. Create a new Site (Add a Theme here, chose wathever you want Hugo Themes)
Follow these steps to put your website on GitHub
- Now it’s time to create a repository on GitHub:
<USERNAME>.github.io
, this is the repository will contain the fully rendered version of your Hugo website. - Make your website work locally(
hugo server -t <YOURTHEME>
). Open your browser tohttp://localhost:1313.
git submodule add -b master git@github.com:<USERNAME>/<USERNAME>.github.io.git public
. This creates a git submodule and a folder called ‘public’ , perhaps you will see a warning related to the folder recently created, please ommit it. Now you can see an empty folder ‘public’.- run
hugo
, once done pressCTRL + C
and the ‘public’ folder will have all the content rendered - Here you have a script to automate all the process, once you create a new post you can execute this script: Script on GitHub