You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
improve the rendering of the man pages
This commit is contained in:
@@ -68,62 +68,14 @@ jobs:
|
||||
|
||||
- name: Convert Manpages to HTML and Generate Index
|
||||
run: |
|
||||
mkdir -p manpages-html
|
||||
# Extract tldr pages for examples
|
||||
mkdir -p tldr-pages
|
||||
if [ -f coreutils/docs/tldr.zip ]; then
|
||||
unzip -o coreutils/docs/tldr.zip -d tldr-extract
|
||||
find tldr-extract -name "*.md" -exec cp {} tldr-pages/ \;
|
||||
fi
|
||||
|
||||
# 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"
|
||||
manpage_names="$manpage_names $name"
|
||||
fi
|
||||
done
|
||||
|
||||
# Generate index.html with links to all manpages
|
||||
cat > manpages-html/index.html << 'HEADER'
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>uutils coreutils - Manual Pages</title>
|
||||
<style>
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 1200px; margin: 0 auto; padding: 20px; }
|
||||
h1 { color: #333; }
|
||||
.breadcrumb { margin-bottom: 20px; }
|
||||
.breadcrumb a { color: #007acc; text-decoration: none; }
|
||||
.breadcrumb a:hover { text-decoration: underline; }
|
||||
.manpage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-top: 30px; }
|
||||
.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; }
|
||||
.manpage-link:hover { background: #007acc; color: white; border-color: #007acc; transform: translateY(-2px); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body { background: #1a1a1a; color: #e0e0e0; }
|
||||
h1 { color: #e0e0e0; }
|
||||
.manpage-link { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
|
||||
.manpage-link:hover { background: #007acc; color: white; border-color: #007acc; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="breadcrumb">
|
||||
<a href="/">Home</a> /
|
||||
<a href="/coreutils">Coreutils</a> /
|
||||
<span>Manual Pages</span>
|
||||
</div>
|
||||
<h1>Manual Pages</h1>
|
||||
<p>Complete manual pages for all uutils coreutils commands. Click on any command to view its full documentation.</p>
|
||||
<div class="manpage-grid">
|
||||
HEADER
|
||||
|
||||
for name in $(echo $manpage_names | tr ' ' '\n' | sort); do
|
||||
echo " <a href=\"${name}.html\" class=\"manpage-link\">${name}</a>" >> manpages-html/index.html
|
||||
done
|
||||
|
||||
cat >> manpages-html/index.html << 'FOOTER'
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
FOOTER
|
||||
uutils.github.io/scripts/build-manpages.sh manpages tldr-pages manpages-html uutils.github.io/templates
|
||||
|
||||
- name: Build Findutils Docs
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user