Reading time: 1 min
Following Mike Dane’s Static Site Generator tutorial @ youtube.
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install --tags extended
Add ~/go/bin
to $PATH
hugo new site test
NOTE: theme repo: https://themes.gohugo.io
cd test/themes
git clone 'https://github.com/giraffeacademy/ga-hugo-theme.git'
cd ..
Edit config.toml
adding: theme = "ga-hugo-theme"
Test the site: hugo server
hugo new a.md
creates a.md
skeleton file inside content
directory.
To create a file inside a subdirectory, run: hugo new dir/b.md
.
View created files: hugo server -D
. -D
for viewing drafts.
Hugo automatically creates list template
files for top level directories.
If you want to have a listing for nested directory, create an _index.md
file
in it.