Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion generate_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def rewrite_html_content(self, content: str) -> str:
return content

def generate_index(self) -> None:
"""
Generate a static index HTML page under the public directory listing repository HTML files grouped by category.

Scans the repository (excluding common build, VCS, virtualenv and vendor directories), copies required vendor assets into public/vendor, rewrites HTML files to reference local vendored assets, copies those files into the public tree, and produces a themed index at public/index.html with category tabs, search, pagination, per-category icons, total counts, and a UTC generation timestamp. Files in hidden categories (category name starting with '.') or in excluded directories are skipped. If reading or rewriting a file fails, the file is copied as a fallback.
"""
root_dir = "."
output_dir = "public"
index_file = "index.html"
Expand Down Expand Up @@ -887,4 +892,4 @@ def generate_index(self) -> None:
print(f"Successfully updated {output_index_path} with vendored assets at {current_time}")

if __name__ == "__main__":
Solution().generate_index()
Solution().generate_index()
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ <h1 class="site-title">

<footer>
<span class="footer-icon">🧪</span>
Generated on 2026-02-20 03:22:46 UTC
Generated on 2026-02-20 03:41:46 UTC
</footer>

<script>
Expand Down