Hugo Setup

Reference:
Hugo Quick start
Hextra Theme
Host on GitLab Pages

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
hugo new site hextra --format=yaml
cd hextra/
hugo mod init gitlab.com/hugo9045842/hextra
hugo mod get github.com/imfing/hextra

vi hugo.yaml

hugo new content/_index.md
hugo new content/docs/_index.md

hugo server -D --disableFastRender

hugo server -D --disableFastRender

hugo 
hugo server

and…

1
git init

Before running hugo run…

git submodule update --init

Build the site

hugo

…or if you want to build drafts…

hugo --buildDrafts

Draft files will not be compiled by CI/CD
You do not have to build the site to run push to GitLab

Setup git

git init
git add *
git commit -m "first commit"

create .gitignore to ignore public

/public
git remote add origin ssh://git@gitlab.com/hugo9045842/hextra.git
git push -u origin master
remote: 
To ssh://gitlab.com/hugo9045842/hextra.git
 * [new branch]      master -> master
branch 'master' set up to track 'origin/master'.