This is a quick start template for Hugo theme Stack. It uses Hugo modules feature to load the theme.
It comes with a basic theme structure and configuration. GitHub action has been set up to deploy the theme to a public GitHub page automatically. Also, there's a cron job to update the theme automatically everyday.
Make sure Prettier is setup with the extension to setup .html
files mixing Golang code with HTML.
In this repo, it is included:
bash init-prettier-golang-html-formatter.sh
Then, add a .prettierrc
file with:
{
"plugins": ["prettier-plugin-go-template"],
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template",
"goTemplateBracketSpacing": true,
"bracketSameLine": true
}
},
{
"files": ["*.js", "*.ts"],
"options": {
"useTabs": true,
"printWidth": 120,
"singleQuote": true
}
}
]
}
MAKE SURE TO run hugo build
before pushing !
Source: gohugo Forum
If you want to build this site using another static page hosting, you need to make sure they have Go installed in the machine.
You need to overwrite build command to install manually Go:
amazon-linux-extras install golang1.11 && hugo --gc --minify
Make sure also to specify Hugo version in the environment variable HUGO_VERSION
(Use the latest version of Hugo extended):