A local Go pkgsite serving the module documentation, with automatic browser refresh.
"features": {
"ghcr.io/thediveo/devcontainer-features/local-pkgsite:0": {}
}
Options Id | Description | Type | Default Value |
---|---|---|---|
port | TCP port serving packages documentation | string | 6060 |
reload-delay | time in milliseconds to delay the reload event following file changes | string | 2000 |
reload-debounce | time in milliseconds to restrict the frequency in which browser:reload events can be emitted to connected clients | string | 5000 |
Tested with:
- ghcr.io/almalinux/almalinux,
- mcr.microsoft.com/devcontainers/base:debian,
- fedora,
- mcr.microsoft.com/devcontainers/base:ubuntu.
@mdaverde for his blog post Build your Golang package docs locally that forms the basis for this devcontainer feature.
The port configured with the port
option is served by
browser-sync
, and browser-sync
in turn proxies pkgsite
. pkgsite
is started with a random port from the
ephemeral port
range, this random
port is determined once when the devcontainer starts and then kept constant.
nodemon
monitors your Go sources
for changes and then triggers a browser refresh and pkgsite
restart.
Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md
.