Hugo Quickstart Template#
This is a bare-bones Hugo project that has everything you need to quickly deploy it to Netlify.
Hate reading, here’s a video: https://youtu.be/t-tsRxxYdpk
Love reading, here’s blog post: https://www.netlify.com/blog/deploy-your-hugo-app-quick/
Table of Contents:#
Quick Setup + Deploy Option#
Click this button and it will help you create a new repo, create a new Netlify project, and deploy!
Regular Setup#
1. Cloning + Running Locally#
Clone this repo with one of these options:
- Click the ‘Use this template’ button at the top of the page
- Or via the command line
git clone https://github.com/netlify-templates/hugo-quickstart
Start the Hugo sever & check it out:
hugo server -D- go to http://localhost:1313/
Alternatively, you can run this locally with the Netlify CLI’s by running the
netlify devcommand for more options like receiving a live preview to share (netlify dev --live) and the ability to test Netlify Functions and redirects.
2. Deploying#
Install the Netlify CLI globally
npm install netlify-cli -gRun
hugoThen use the
netlify deployfor a deploy preview link ornetlify deploy --prodto deploy to production
Here are a few other ways you can deploy this template:
Use the Netlify CLI’s create from template command
netlify sites:create-template hugo-quickstartwhich will create a repo, Netlify project, and deploy itIf you want to utilize continuous deployment through GitHub webhooks, run the Netlify command
netlify initto create a new project based on your repo ornetlify linkto connect your repo to an existing project
Styling#
We’ve added some modern styling to this template using Sass within an external stylesheet, this will allow you to easily remove our styling and add in your own.
If you decide that you want to keep our styling you can review our style notes below.
Notes on Styling#
The variables below give you the ability to change the gradient colors of the blobs and are interpolated into the URL string of the background-img within the body.
// Controls the blob blur gradient colors within the main tag's svg
--top-right-blur-1: #2ebc92;
--top-right-blur-2: #ecbb50;
--bttm-left-blur-1: #ff3e89;
--bttm-left-blur-2: #0095cc;Remove Styling#
If you decide that our styling is not for you, all you’ll need to do is remove the demo-styling.css file.
Hugo + Netlify Resources#
Here are some resources to help you on your Hugo + Netlify coding fun!
Hope this template helps :) Happy coding 👩🏻💻!
Testing#
Included Default Testing#
We’ve included some tooling that helps us maintain these templates. This template currently uses:
- Renovate - to regularly update our dependencies
- Cypress - to run tests against how the template runs in the browser
- Cypress Netlify Build Plugin - to run our tests during our build process
If your team is not interested in this tooling, you can remove them with ease!
Removing Renovate#
In order to keep our project up-to-date with dependencies we use a tool called Renovate. If you’re not interested in this tooling, delete the renovate.json file and commit that onto your main branch.
Removing Cypress#
For our testing, we use Cypress for end-to-end testing. This makes sure that we can validate that our templates are rendering and displaying as we’d expect. By default, we have Cypress not generate deploy links if our tests don’t pass. If you’d like to keep Cypress and still generate the deploy links, go into your netlify.toml and delete the plugin configuration lines:
[[plugins]]
package = "netlify-plugin-cypress"
- [plugins.inputs.postBuild]
- enable = true
-
- [plugins.inputs]
- enable = false
If you’d like to remove the netlify-plugin-cypress build plugin entirely, you’d need to delete the entire block above instead. And then make sure sure to remove the package from the dependencies using:
npm uninstall -D netlify-plugin-cypressAnd lastly if you’d like to remove Cypress entirely, delete the entire cypress folder and the cypress.config.ts file. Then remove the dependency using:
npm uninstall cypressLicense#
MIT License
Copyright (c) 2025 netlify-templates
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.