# 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/<theme-name>.git ./themes/<theme-name> ``` ### hugo module Init your project ``` hugo mod init github.com/<your_user>/<your_project> ``` Add the theme to your hugo config file ``` ########################## hugo.yaml ########################## module: imports: - path: https://example.com/theme/<theme-name> ########################## hugo.toml ########################## [module] [[module.imports]] path = 'https://example.com/theme/<theme-name>' ########################## hugo.json ########################## { "module": { "imports": [ { "path": "https://example.com/theme/<theme-name>" } ] } } ``` 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 <div> <!-- prettier-ignore --> {{if }} {{end }} </div> ``` ##### Multiline ```html <html> {{/* prettier-ignore-start */}} <script> {{if }} Whatever. {{else }} Psych. {{end }} </script> {{/* prettier-ignore-end */}} </html> ``` [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/)