From dc7e2344b123651902874cbcc49df8d8454e5247 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 21 Mar 2026 19:22:38 +0100 Subject: [PATCH] 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/ --- .github/workflows/website.yml | 68 +++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index be1ebb707..e95dc5668 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -70,38 +70,60 @@ jobs: run: | mkdir -p manpages-html - # Create JSON list for dynamic loading - echo "[" > manpages-html/manpages.json - first=true - - # Convert manpages to HTML + # Convert manpages to HTML and collect names + manpage_names="" for man in manpages/usr/local/share/man/man*/*.1; do if [ -f "$man" ]; then name=$(basename "$man" .1) man2html -r "$man" > "manpages-html/${name}.html" - - # Add to JSON list - if [ "$first" = true ]; then - echo " \"${name}\"" >> manpages-html/manpages.json - first=false - else - echo " ,\"${name}\"" >> manpages-html/manpages.json - fi + manpage_names="$manpage_names $name" fi done - echo "]" >> manpages-html/manpages.json + # Generate index.html with links to all manpages + cat > manpages-html/index.html << 'HEADER' + + + + + uutils coreutils - Manual Pages + + + + +

Manual Pages

+

Complete manual pages for all uutils coreutils commands. Click on any command to view its full documentation.

+
+ HEADER - # Create index page for Zola to process (picked up by the "Run Zola" step) - cat > uutils.github.io/content/coreutils-manpages.md << 'EOF' - +++ - title = "Manual Pages" - template = "manpages.html" + for name in $(echo $manpage_names | tr ' ' '\n' | sort); do + echo " ${name}" >> manpages-html/index.html + done - [extra] - project = "coreutils" - +++ - EOF + cat >> manpages-html/index.html << 'FOOTER' +
+ + + FOOTER - name: Build Findutils Docs run: |