Quickstart for Hugo static site generator, to get the first project up and running
Required
- Go download and install or use a docker container
- Hugo download and add to your PATH to allow it to be executable
Recommended:
See Cloning a repository for details on how to create a local copy of this project on your computer.
e.g.
clone git@github.com:Pen-y-Fan/hugo-quickstart.git
cd hugo-quickstart
The theme has been included as a git submodule, it needs to be initialised too.
git submodule update --init
Basic commands
To create a new post My second post in the posts directory. Note the kebab case (url friendly) for the markdown file name.
hugo new posts/my-second-post.md
Use the hugo server to check the current state of the development site (-D includes draft pages)
hugo server -D
The website can be accessed from localhost:1313
Once the new content has been checked, you are ready to deploy
- check
draft: false
is set in the front matter - deploy the latest additions to the public directory:
hugo -D
MIT License (MIT). Please see License File for more information.