-
Forked Razon Yang’s Hugo Bootstrap Theme
-
Install Hugo (on Linux)
- Download a tarball from Hugo’s release page. Extended version is needed. For example https://github.com/gohugoio/hugo/releases/download/v0.99.1/hugo_extended_0.99.1_Linux-64bit.tar.gz
- Untar it and copy the
hugo
file over to a folder in your$PATH
e.g.$HOME/.local/bin
- Untar it and copy the
snap install hugo --channel=extended
(No longer recommended because snap autoupdates hugo versions)- NOTE: The extended channel is needed for this site build
- Update with
sudo snap refresh hugo --channel=extended
- For more snap commands, see Snap Cheatsheet
- See Hugo version with
hugo version
hugo v0.92.1+extended linux/amd64 BuildDate=2022-01-27T15:08:20Z
- Will need to install npm via apt-get
- Download a tarball from Hugo’s release page. Extended version is needed. For example https://github.com/gohugoio/hugo/releases/download/v0.99.1/hugo_extended_0.99.1_Linux-64bit.tar.gz
-
Create a new site from scratch (this site uses tag v0.79.1)
1hugo new site sagar.se 2cd sagar.se/ 3git submodule add git@github.com:sagarbehere/hugo-theme-bootstrap.git themes/hugo-theme-bootstrap
-
Create a
.gitignore
file and populate with1# Created by https://www.toptal.com/developers/gitignore/api/hugo 2# Edit at https://www.toptal.com/developers/gitignore?templates=hugo 3 4### Hugo ### 5# Generated files by hugo 6/public/ 7/resources/_gen/ 8/assets/jsconfig.json 9hugo_stats.json 10 11# Executable may be added to repository 12hugo.exe 13hugo.darwin 14hugo.linux 15 16# Temporary lock file while building 17/.hugo_build.lock 18 19# End of https://www.toptal.com/developers/gitignore/api/hugo 20 21# npm assets 22package-lock.json 23node_modules/ 24 25# ignore system files 26.DS_Store
-
Create assets folder in site root and create a
_custom.scss
file for holding later tweaks1mkdir -p assets/main/scss 2touch assets/main/scss/_custom.scss
-
Build the hugo site
1hugo mod npm pack 2npm install
-
Create a git repo and start committing to github
git init
git add .
git commit
- Log in to Github and create a new repository from the web interface
git remote add origin git@github.com:sagarbehere/sagar.se
git branch --set-upstream-to=origin/main
git pull origin main --allow-unrelated-histories
git push -u origin main