You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN sed -i 's|^theme = .*|theme = "FixIt"|' hugo.toml && \
33
-
sed -i 's|^baseURL = .*|baseURL = "https://example.org/"|' hugo.toml
34
-
35
-
# 确保至少有一篇文章(如果 demo 中没有 posts)
36
-
RUN if [ ! -d content/posts ]; then mkdir -p content/posts; fi && \
37
-
if [ ! -f content/posts/welcome.md ]; then \
38
-
printf '%s\n''---''title: "Welcome to FixIt Docker"'"date: $(date +%Y-%m-%d)"'draft: false''---''''This is a default post from the Docker image. You can replace it by mounting your own content.''''Happy blogging!' > content/posts/welcome.md; \
39
-
fi
29
+
cp -r /tmp/fixit-repo/layouts \
30
+
/tmp/fixit-repo/assets \
31
+
/tmp/fixit-repo/i18n \
32
+
/tmp/fixit-repo/data \
33
+
/tmp/fixit-repo/archetypes \
34
+
/tmp/fixit-repo/static \
35
+
/tmp/fixit-repo/theme.toml \
36
+
themes/FixIt/
37
+
38
+
# 生成基础配置文件(符合 FixIt 主题要求)
39
+
RUN cat > config.toml <<EOF
40
+
baseURL = "https://example.org/"
41
+
title = "My FixIt Site"
42
+
theme = "FixIt"
43
+
defaultContentLanguage = "zh-cn"
44
+
enableRobotsTXT = true
45
+
paginate = 10
46
+
summaryLength = 70
47
+
48
+
[markup]
49
+
_merge = "shallow"
50
+
51
+
[outputs]
52
+
_merge = "shallow"
53
+
54
+
[taxonomies]
55
+
_merge = "shallow"
56
+
57
+
[params]
58
+
version = "4.x"
59
+
description = "A site built with Hugo FixIt theme"
60
+
keywords = ["Hugo", "FixIt", "Blog"]
61
+
defaultTheme = "auto"
62
+
EOF
63
+
64
+
# 创建一篇默认示例文章(确保站点有内容)
65
+
RUN mkdir -p content/posts && \
66
+
printf '%s\n''---''title: "Welcome to FixIt Docker"'"date: $(date +%Y-%m-%d)"'draft: false''---''''This is a default post from the Docker image. You can replace it by mounting your own content.''''Happy blogging!' > content/posts/welcome.md
0 commit comments