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
echo "Generating index.html from README.md with a TOC..."
99
-
pandoc README.md -f markdown -t html -s \
100
-
--template=pandoc_template.html \
101
-
-o index.html \
102
-
--metadata title="$REPO_HTML_TITLE" \
103
-
--toc --toc-depth=6 -V toc-title=""
104
-
GENERATED=1
105
-
else
106
-
echo "No index.html or README.md found; writing minimal page."
107
-
printf '%s\n' '<!doctype html><html><head><meta charset="utf-8"><title>Site</title></head><body>' '<h1>Site</h1>' '<p>No README.md found. Add one and push to regenerate this page.</p>' '</body></html>' > index.html
.sidebar nav.toc ul ul { padding-left:14px; border-left:2px solid #e5e7eb; margin-left:6px; }
129
112
130
113
/* TOC indentation rules */
131
114
.sidebar nav.toc ul ul { padding-left:14px; border-left:2px solid #e5e7eb; margin-left:6px; }
@@ -145,6 +128,22 @@ jobs:
145
128
}
146
129
</style>'
147
130
131
+
# Always rebuild index.html from README.md
132
+
if [ -f README.md ]; then
133
+
echo "Generating index.html from README.md with a TOC..."
134
+
rm -f index.html
135
+
pandoc README.md -f markdown -t html -s \
136
+
--template=pandoc_template.html \
137
+
-o index.html \
138
+
--metadata title="$REPO_HTML_TITLE" \
139
+
--toc --toc-depth=6 -V toc-title=""
140
+
GENERATED=1
141
+
else
142
+
echo "No README.md found; writing minimal page."
143
+
printf '%s\n' '<!doctype html><html><head><meta charset="utf-8"><title>Site</title></head><body>' '<h1>Site</h1>' '<p>No README.md found. Add one and push to regenerate this page.</p>' '</body></html>' > index.html
0 commit comments