Local Development
Local Development
The dev container provides every toolchain this repository needs — Hugo, Terraform, the AWS CLI, Node, and the lint tools. A freshly rebuilt container is enough to start work.
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . make doctor
make doctor verifies that every required tool is on PATH. Run it after the
container starts or after pulling changes that add tooling.
Live reload
hugo serve --source www/StarterSite
This serves the site at http://localhost:1313 with live reload. The server binds
to all interfaces inside the container, so VS Code forwards the port
automatically.
Live reload does not run the documentation staging step, so pages generated from
docs/ are missing until you run make prepare.hugo (or make check.hugo) once.
Source layout
| Path | Contents |
|---|---|
www/StarterSite/content/ | Markdown content with Hugo front matter |
www/StarterSite/layouts/ | Templates, including 404.html |
www/StarterSite/assets/css/ | Site CSS |
www/StarterSite/static/ | Files copied to the output root verbatim |
www/StarterSite/archetypes/ | Front matter defaults for hugo new |
www/StarterSite/hugo.toml | The single Hugo configuration file |
Documentation under docs/ is staged into .cache/docs-site/ and mounted into
the build through Hugo module mounts. Edit the Markdown in docs/ — never the
staged copy.
Commands
make check.hugo # Build the site into public/
make lint # Every installed linter
make validate # Build, then Terraform validation and link checking
make security # Secret, vulnerability, and IaC scanners
make format # Rewrite files with Prettier
make clean # Remove build output
public/ is build output and is never committed. It is also what a deployment
uploads, so the bytes you preview are the bytes that ship.
Set OFFLINE=1 to skip steps that need network access, such as Terraform
provider downloads and TFLint plugin installs.
Deploying your own copy
make deploy
This builds the site, provisions your own Bunny Storage zone and pull zone,
uploads public/, and purges the CDN. The instance is named after your
Terraform workspace, so it does not collide with anyone else’s, and
make deploy.destroy removes it completely. See
deployment.md.
Troubleshooting
make doctor reports missing tools. Rebuild the container:
devcontainer up --workspace-folder . --remove-existing-container
Hugo fails with module mount errors. Stage the documentation content first
with make prepare.hugo.
The link checker reports broken HTML links. It reads public/; rebuild with
make check.hugo first.
Terraform validation fails on providers. Validation runs with
-backend=false and needs no credentials, but it does download provider plugins.
Ensure network access, or accept the skip under OFFLINE=1.
Port 1313 is in use. hugo serve --source www/StarterSite --port 1314.