chore: add Dockerfile and devcontainer configuration for Hugo theme development

This commit is contained in:
Cell
2026-05-29 16:41:21 +08:00
parent ddbf47df7f
commit bc3fb3a717
5 changed files with 56 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:24
# Install Hugo Extended
ARG HUGO_VERSION
RUN curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
&& tar -C /usr/local/bin -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" hugo \
&& rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
# Install Dart Sass
ARG DART_SASS_VERSION
RUN curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" \
&& tar -C /usr/local -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" \
&& ln -s /usr/local/dart-sass/sass /usr/local/bin/sass \
&& rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
# Install Go
ARG GO_VERSION
RUN curl -sLJO "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
&& tar -C /usr/local -xf "go${GO_VERSION}.linux-amd64.tar.gz" \
&& rm "go${GO_VERSION}.linux-amd64.tar.gz"
ENV PATH="/usr/local/go/bin:${PATH}"
+24
View File
@@ -0,0 +1,24 @@
{
"name": "FixIt Theme",
"build": {
"dockerfile": "Dockerfile",
"args": {
"HUGO_VERSION": "0.158.0",
"DART_SASS_VERSION": "1.99.0",
"GO_VERSION": "1.24.4"
}
},
"postCreateCommand": "pnpm install",
"customizations": {
"vscode": {
"extensions": [
"budparr.language-hugo-vscode",
"kaellarkin.hugo-shortcode-syntax",
"lruihao.hugo-partials-refs",
"tamasfe.even-better-toml",
"casualjim.gotemplate",
"SomewhatStationery.some-sass"
]
}
}
}