Refactor Rocky Man Page Generator

- Improved logging and error handling in main.py, including better version management and configuration handling.
- Enhanced RepoManager to dynamically switch between pub and vault repositories for package retrieval.
- Updated ManPageConverter to handle symlink detection and generate appropriate redirect HTML.
- Refined WebGenerator to support dynamic version grid layout and improved HTML generation for man pages and indexes.
- Modified templates to remove trademark symbols and enhance styling for version cards.
- Added support for existing versions in the root index generation.

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
Stephen Simpson
2025-12-04 17:04:55 -06:00
parent 89404a2042
commit e356431b72
8 changed files with 427 additions and 550 deletions

View File

@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block header_title %}Rocky Linux Man Pages{% endblock %}
{% block header_subtitle %}Man page documentation for Rocky Linux packages{% endblock %}
{% block header_title %}Rocky Linux Man Pages{% endblock %}
{% block header_subtitle %}Man page documentation for Rocky Linux packages{% endblock %}
{% block extra_css %}
.logo-container {
@@ -15,9 +15,11 @@
height: auto;
}
.version-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
grid-template-columns: repeat({{ num_columns }}, 1fr);
gap: 1.5rem;
margin-top: 2rem;
}
@@ -32,7 +34,7 @@
}
.version-grid {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-template-columns: 1fr;
gap: 1rem;
}
@@ -40,9 +42,21 @@
padding: 1.5rem;
}
.version-card.small {
padding: 0.75rem;
}
.version-card.small {
padding: 0.75rem;
}
.version-number {
font-size: 2rem;
}
.version-card.small .version-number {
font-size: 1.5rem;
}
}
@media (max-width: 480px) {
@@ -55,6 +69,10 @@
gap: 1rem;
}
.version-card.small {
padding: 0.5rem;
}
.intro {
font-size: 0.9rem;
}
@@ -71,6 +89,15 @@
display: block;
}
.version-card.small {
padding: 1rem;
opacity: 0.7;
}
.version-card.small .version-number {
font-size: 1.8rem;
}
.version-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
@@ -128,19 +155,27 @@
<div class="intro">
<p>
Man page documentation for packages in the Rocky Linux BaseOS and AppStream repositories.
Man page documentation for packages in the Rocky Linux BaseOS and AppStream repositories.
</p>
</div>
<div class="version-section">
<h2>Select Version</h2>
<div class="version-grid">
{% for version in versions %}
<a href="{{ version }}/index.html" class="version-card">
<div class="version-number">{{ version }}</div>
<div class="version-label">Rocky Linux™</div>
{% for row in version_rows %}
{% set outer_loop = loop %}
{% for item in row %}
{% if item %}
{% set major, minor = item %}
<a href="{{ major }}.{{ minor }}/index.html" class="version-card{% if not outer_loop.first %} small{% endif %}">
<div class="version-number">{{ major }}.{{ minor }}</div>
{% if outer_loop.first %}
<div class="version-label">Rocky Linux</div>
<div class="version-browse">Browse man pages →</div>
{% endif %}
</a>
{% endif %}
{% endfor %}
{% endfor %}
</div>
</div>