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"
]
}
}
}
+9
View File
@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
+1 -1
View File
@@ -1,3 +1,3 @@
module github.com/hugo-fixit/FixIt
go 1.19
go 1.20
+1
View File
@@ -35,6 +35,7 @@
"build:demo": "pnpm -F demo build",
"build:test": "pnpm -F test build",
"build": "concurrently 'pnpm build:demo' 'pnpm build:test' && pnpm -F integration start",
"clean": "rm -rf public resources/_gen apps/*/public apps/*/resources/_gen",
"preview": "serve public",
"lint": "eslint --cache .",
"typecheck": "tsc --noEmit",