How setup Hugo

How setup Hugo

Download hugo (hugo_extended_0.69.0_Linux-64bit.tar.gz) from https://github.com/gohugoio/hugo/releases and unpack to ~/.local/bin

$ hugo new site personal-blog

Output will be:

Congratulations! Your new Hugo site is created in ~/personal-blog.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
$ cd personal-blog

$ git init

$ git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder

Edit config.toml, for example like here

Next, follow this guide for deploy to Github pages:

echo 'public/' >> .gitignore

rm -rf public

git submodule add -b master https://github.com/<USERNAME>/<USERNAME>.github.io.git public

hugo

cd public
git add .
git commit -m "Rebuilding"
git push origin master

This is it. Thanks for reading. Happy coding 🚀

comments powered by Disqus