Add devcontainer configuration for Codespaces - #18
Conversation
Agent-Logs-Url: https://github.com/Ctrl-Alt-GG/link-collection/sessions/796da556-c989-4096-8a9b-861a228c0e0b Co-authored-by: tormachris <1529569+tormachris@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a Dev Container configuration so contributors can open the repo in GitHub Codespaces (or any devcontainer-compatible environment) with the expected Node/Hugo tooling preinstalled.
Changes:
- Introduces
.devcontainer/devcontainer.jsonusing a Node 24 base image. - Installs Hugo (extended) via a devcontainer feature and forwards port 1313 for the dev server.
- Runs
npm ciafter container creation and recommends editor extensions for Hugo/Tailwind/TOML/formatting.
| "image": "mcr.microsoft.com/devcontainers/javascript-node:1-24-bookworm", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/hugo:1": { | ||
| "extended": true, | ||
| "version": "0.160.0" | ||
| }, |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/Ctrl-Alt-GG/link-collection/sessions/0ae140bf-f1a0-4d15-b28c-8944033a92e2 Co-authored-by: tormachris <1529569+tormachris@users.noreply.github.com>
Switched the dev container to a |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-cliff-0be80a303-18.westeurope.4.azurestaticapps.net |
Adds a Dev Container so the repo can be opened in GitHub Codespaces or any devcontainer-compatible tool. Node and Hugo versions are derived at build time from the repository's existing pinned sources rather than duplicated in
.devcontainer/.Configuration
.devcontainer/devcontainer.json— references a local Dockerfile (build context = repo root), forwards port1313, runsnpm cion container create, and recommends VS Code extensions for Hugo, Tailwind CSS IntelliSense, Even Better TOML, ESLint, and Prettier..devcontainer/Dockerfile— based onmcr.microsoft.com/devcontainers/base:bookworm, with no hard-coded versions:.nvmrcand installs Node from the NodeSource apt repo.module.hugoVersion.minfromconfig.toml(viased) and downloads the matchinghugo_extended_<version>_linux-{amd64,arm64}.tar.gzfrom the official GitHub release.Bumping
.nvmrcorconfig.tomlis sufficient — the dev container picks up the new versions on rebuild without any further edits in.devcontainer/.Usage
npm cifinishes, runnpm run devand open the forwarded port 1313.Verification
docker buildof the Dockerfile succeeds..nvmrc) and Hugo v0.160.0 extended (matchingconfig.toml).npm ciandnpm run build(Tailwind + Hugo) complete successfully inside the container.No application or workflow files were touched.