How to (set up this website)? ๐
I use a fork of the Hugo theme mini by nodejh, only becuase I want to make a few customisations. Please feel free to use either as the setup steps would be the same :)
1. Pre-requisites ๐
Please ensure you have hugo
installed on your system. If not, you may follow the installation instruction here.
2. Setup ๐
- Create an empty repo and clone it
git clone https://github.com/<your username>/<your repo>.git
- Navigate to your cloned repo and install the theme as a submodule. You might have to replace
deutranium
withnodejh
depending on which theme you’re using.
git submodule add https://github.com/deutranium/hugo-theme-mini.git themes/mini
- Now that we have the theme in place, we need to create the directory structure to store out content.
2.1 Copy exampleSite from the theme itself (easier and recommended) ๐
- Simply copy the exampleSite provided with the theme itself
cp -r ./themes/mini/exampleSite/ ./
2.2 Create directory structure from scratch ๐
- Use a bunch of
mkdir
andtouch
statements to create the following directory structure:
.
โโโ LICENSE
โโโ README.md
โโโ config.yaml
โโโ content
โย ย โโโ about
โย ย โย ย โโโ _index.md
โย ย โโโ blog (add this only if you're using `deutranium/` fork of the theme)
โย ย โโโ _index_.md
โย ย โโโ posts
โย ย โโโ test.md
โโโ layout
โโโ static
Recall that mkdir <folder name>
and touch <file name>
create the folders and files with the respective names.
3. Run the server ๐
- Simply run the server from your project root using
hugo server
and you should be able to see your website at the URL shown in your terminal window (Probably http://localhost:1313/about/)
Please note that the website would have some palceholder content if you followed 2.1
, and empty otherwise.
4. Enjoy :) ๐
Have some cold lemonade or hot chocolate depending on the how cold/hot it is outside your window!
5. (Optional) Deploy on Github Pages ๐
Check out this wonderful tutorial by Hugo: Host on Github Pages