This repository can be forked to create a hugo development environment in a VS Code Development container.
The documentation here is how to fork and use this repo, not how to create sites in hugo. If you need answers to that then use the hugo documentation.
- fork repository
- Setup your site from VS Code Terminal
- Update your devcontainer.json to start hugo server
- Start using as you would for normal site dev
- Configure dev to prod pipelines in the repo (different for each site)
In VS Code open a new terminal.
ctrl-shift-` or Terminal -> new terminal
hugo versionShould return a version of hugo installed.
hugo new site myhugositeShould create a new hugo site. This site will not include a theme but it will have hugo.toml and other files.
Not that themes can be added a git submodules.
Terminal helpful includes other instructions and a link to the hugo documenteration.
hugo serverhugo new content/posts/my-first-post.mdIf you don't do this you will need to start the hugo server manually each time you start the container.
After you successfully have created your site.
You can configure the devcontianer.json to auto start and run the server so you can see your updates as you make them.
In devcontainer.json uncomment the postStartCommand.
// Use 'postStartCommand' to run commands after the container is started, will run each time.
// this is commented out until you run the commands in terminal to create your site.
"postStartCommand": "hugo version && hugo server -D",This container spins up an ubuntu instance that can be used to create a new hugo site and includes hugo, go, github cli, and git large file system in addition to normal vs code container settings.
It also includes default extensions for VS Code of spell checking, amazon Q, aws settings, and md linter.