File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,13 +18,11 @@ RUN hugo version
1818
1919WORKDIR /build
2020
21- # 下载 FixIt 主题的 Release 压缩包
22- ADD https://github.com/hugo-fixit/FixIt/archive/refs/tags/v0.3.6.tar.gz /tmp/
21+ # 完整克隆 FixIt 主题(不使用 --depth 1,确保 exampleSite 存在)
22+ RUN git clone --branch v0.3.6 https://github.com/hugo-fixit/FixIt.git themes/FixIt
2323
24- # 解压到 themes/FixIt(自动剥离顶层目录),并复制 exampleSite 内容
25- RUN mkdir -p /build/themes/FixIt && \
26- tar -xzf /tmp/v0.3.6.tar.gz -C /build/themes/FixIt --strip-components=1 && \
27- cp -r /build/themes/FixIt/exampleSite/. /build/
24+ # 复制 exampleSite 内容到当前目录
25+ RUN cp -r themes/FixIt/exampleSite/. .
2826
2927# 修正主题配置:确保主题名称正确
3028RUN sed -i 's|theme = .*|theme = "FixIt"|' config.toml
@@ -40,7 +38,7 @@ RUN apk add --no-cache bash libstdc++
4038# 复制 hugo 二进制
4139COPY --from=builder /usr/local/bin/hugo /usr/local/bin/hugo
4240
43- # 复制默认站点的完整源码
41+ # 复制默认站点的完整源码(用于运行时动态生成)
4442COPY --from=builder /build /app/default-site
4543COPY --from=builder /default-public /usr/share/nginx/html
4644
You can’t perform that action at this time.
0 commit comments