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: |