Skip to content

JeremieLitzler/jeremielitzler.fr-with-hugo-theme-stack

Repository files navigation

Hugo Theme Stack Starter Template

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.

Updating theme manually

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

Deploy somewhere else than Netilf?

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

Build setup

Make sure also to specify Hugo version in the environment variable HUGO_VERSION (Use the latest version of Hugo extended):

Environment variable

About

Mon blog en français avec Hugo et Hugo Theme Stack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published