# Hugo Site Welcome to your new hugo project Here's some steps to get you started ``` hugo new site . --force ``` Add a theme to the themes folder: ### using a submodule, generally recommended ``` git submodule add https://example.com/theme/.git ./themes/ ``` ### hugo module Init your project ``` hugo mod init github.com// ``` Add the theme to your hugo config file ``` ########################## hugo.yaml ########################## module: imports: - path: https://example.com/theme/ ########################## hugo.toml ########################## [module] [[module.imports]] path = 'https://example.com/theme/' ########################## hugo.json ########################## { "module": { "imports": [ { "path": "https://example.com/theme/" } ] } } ``` See more at the [hugo docs](https://gohugo.io/hugo-modules/use-modules/) ## Prettier This repository includes a .prettierrc file, to install prettier and the go plugin you can use npm ``` npm install --save-dev prettier prettier-plugin-go-template ``` #### Additional Options ```js // .prettierrc { /** * Enables & disables spacing between go statements. * E.g. {{ statement }} vs {{statement}}. * Default: true */ "goTemplateBracketSpacing": true } ``` #### Ignoring Code ##### Single Block ```html
{{if }} {{end }}
``` ##### Multiline ```html {{/* prettier-ignore-start */}} {{/* prettier-ignore-end */}} ``` [Please show the devs of prettier hugo some love](https://github.com/NiklasPor/prettier-plugin-go-template) ## License Here's a few to pick from: [Open Source Initiative](https://opensource.org/license) Here's some I recommend: - [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.en.html#license-text) - [MIT](https://mit-license.org/)