Skip to content

Commit dc7e234

Browse files
committed
Fix manpage build: remove deprecated mdbook field and fix index generation
- Strip 'multilingual' from book.toml before mdbook build (removed in newer versions) - Generate a self-contained manpages index.html instead of relying on Zola (the Zola approach failed due to wrong paths and content conflict with coreutils.md) - Copy manpage HTML files in the collect step so they end up at /coreutils/manpages/
1 parent 1b87faa commit dc7e234

1 file changed

Lines changed: 46 additions & 24 deletions

File tree

.github/workflows/website.yml

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,38 +70,60 @@ jobs:
7070
run: |
7171
mkdir -p manpages-html
7272
73-
# Create JSON list for dynamic loading
74-
echo "[" > manpages-html/manpages.json
75-
first=true
76-
77-
# Convert manpages to HTML
73+
# Convert manpages to HTML and collect names
74+
manpage_names=""
7875
for man in manpages/usr/local/share/man/man*/*.1; do
7976
if [ -f "$man" ]; then
8077
name=$(basename "$man" .1)
8178
man2html -r "$man" > "manpages-html/${name}.html"
82-
83-
# Add to JSON list
84-
if [ "$first" = true ]; then
85-
echo " \"${name}\"" >> manpages-html/manpages.json
86-
first=false
87-
else
88-
echo " ,\"${name}\"" >> manpages-html/manpages.json
89-
fi
79+
manpage_names="$manpage_names $name"
9080
fi
9181
done
9282
93-
echo "]" >> manpages-html/manpages.json
94-
95-
# Create index page for Zola to process (picked up by the "Run Zola" step)
96-
cat > uutils.github.io/content/coreutils-manpages.md << 'EOF'
97-
+++
98-
title = "Manual Pages"
99-
template = "manpages.html"
83+
# Generate index.html with links to all manpages
84+
cat > manpages-html/index.html << 'HEADER'
85+
<!DOCTYPE html>
86+
<html>
87+
<head>
88+
<meta charset="utf-8">
89+
<title>uutils coreutils - Manual Pages</title>
90+
<style>
91+
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 1200px; margin: 0 auto; padding: 20px; }
92+
h1 { color: #333; }
93+
.breadcrumb { margin-bottom: 20px; }
94+
.breadcrumb a { color: #007acc; text-decoration: none; }
95+
.breadcrumb a:hover { text-decoration: underline; }
96+
.manpage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-top: 30px; }
97+
.manpage-link { display: block; padding: 12px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 5px; text-decoration: none; color: #333; text-align: center; font-family: monospace; font-weight: bold; font-size: 1.1em; transition: all 0.3s ease; }
98+
.manpage-link:hover { background: #007acc; color: white; border-color: #007acc; transform: translateY(-2px); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
99+
@media (prefers-color-scheme: dark) {
100+
body { background: #1a1a1a; color: #e0e0e0; }
101+
h1 { color: #e0e0e0; }
102+
.manpage-link { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
103+
.manpage-link:hover { background: #007acc; color: white; border-color: #007acc; }
104+
}
105+
</style>
106+
</head>
107+
<body>
108+
<div class="breadcrumb">
109+
<a href="/">Home</a> /
110+
<a href="/coreutils">Coreutils</a> /
111+
<span>Manual Pages</span>
112+
</div>
113+
<h1>Manual Pages</h1>
114+
<p>Complete manual pages for all uutils coreutils commands. Click on any command to view its full documentation.</p>
115+
<div class="manpage-grid">
116+
HEADER
117+
118+
for name in $(echo $manpage_names | tr ' ' '\n' | sort); do
119+
echo " <a href=\"${name}.html\" class=\"manpage-link\">${name}</a>" >> manpages-html/index.html
120+
done
100121
101-
[extra]
102-
project = "coreutils"
103-
+++
104-
EOF
122+
cat >> manpages-html/index.html << 'FOOTER'
123+
</div>
124+
</body>
125+
</html>
126+
FOOTER
105127
106128
- name: Build Findutils Docs
107129
run: |

0 commit comments

Comments
 (0)