@@ -68,62 +68,14 @@ jobs:
6868
6969 - name : Convert Manpages to HTML and Generate Index
7070 run : |
71- mkdir -p manpages-html
72-
73- # Convert manpages to HTML and collect names
74- manpage_names=""
75- for man in manpages/usr/local/share/man/man*/*.1; do
76- if [ -f "$man" ]; then
77- name=$(basename "$man" .1)
78- man2html -r "$man" > "manpages-html/${name}.html"
79- manpage_names="$manpage_names $name"
80- fi
81- done
82-
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
121-
122- cat >> manpages-html/index.html << 'FOOTER'
123- </div>
124- </body>
125- </html>
126- FOOTER
71+ # Extract tldr pages for examples
72+ mkdir -p tldr-pages
73+ if [ -f coreutils/docs/tldr.zip ]; then
74+ unzip -o coreutils/docs/tldr.zip -d tldr-extract
75+ find tldr-extract -name "*.md" -exec cp {} tldr-pages/ \;
76+ fi
77+
78+ uutils.github.io/scripts/build-manpages.sh manpages tldr-pages manpages-html uutils.github.io/templates
12779
12880 - name : Build Findutils Docs
12981 run : |
0 commit comments