diff --git a/gitgen.py b/gitgen.py
index 6c11867..b3900e0 100644
--- a/gitgen.py
+++ b/gitgen.py
@@ -281,55 +281,55 @@ class HTMLGenerator:
f"""<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{BASE_NAME}</title>
- <meta name="description" content="{BASE_DESC}">
- <link rel="stylesheet" href="main.css">
-
- <!-- Open Graph -->
- <meta property="og:site_name" content="{BASE_NAME}">
- <meta property="og:url" content="{BASE_URL}">
- <meta property="og:title" content="{BASE_NAME}">
- <meta property="og:description" content="{BASE_DESC}">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en_GB">
-
- <!-- Twitter Card -->
- <meta property="twitter:card" content="summary">
- <meta property="twitter:url" content="{BASE_URL}">
- <meta property="twitter:title" content="{BASE_NAME}">
- <meta property="twitter:description" content="{BASE_DESC}">
-
- <!-- Microdata -->
- <script type="application/ld+json">
- {{
- "@context": "http://schema.org",
- "@type": "website",
- "name": "{BASE_NAME}",
- "headline": "{BASE_NAME}",
- "url": "{BASE_URL}",
- "description": "{BASE_DESC}"
- }}
- </script>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{BASE_NAME}</title>
+ <meta name="description" content="{BASE_DESC}">
+ <link rel="stylesheet" href="main.css">
+
+ <!-- Open Graph -->
+ <meta property="og:site_name" content="{BASE_NAME}">
+ <meta property="og:url" content="{BASE_URL}">
+ <meta property="og:title" content="{BASE_NAME}">
+ <meta property="og:description" content="{BASE_DESC}">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en_GB">
+
+ <!-- Twitter Card -->
+ <meta property="twitter:card" content="summary">
+ <meta property="twitter:url" content="{BASE_URL}">
+ <meta property="twitter:title" content="{BASE_NAME}">
+ <meta property="twitter:description" content="{BASE_DESC}">
+
+ <!-- Microdata -->
+ <script type="application/ld+json">
+ {{
+ "@context": "http://schema.org",
+ "@type": "website",
+ "name": "{BASE_NAME}",
+ "headline": "{BASE_NAME}",
+ "url": "{BASE_URL}",
+ "description": "{BASE_DESC}"
+ }}
+ </script>
</head>
<body>
- <div class="header">
+ <div class="header">
<h1><a href="/" title="gitgen"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 21 21" width="38" height="38" fill="none" stroke="#222222" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4.13 1.101v12.56m11.972-6.28a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28M4.13 19.94a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28" style="stroke-width:2.04357"/><path d="M13.109 4.241a8.978 9.42 0 0 0-8.978 9.42" style="stroke-width:2.04357"/><path stroke="#0f0" d="M16.172 13.915v6m3-3h-6"/><path stroke="red" d="M19.135 11.43h-6"/></svg></a> {BASE_NAME}</h1>
- <p>Listing {len(repos)} repositories</p>
- </div>
-
- <div class="repo-list">
- <table class="repo-table">
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- <th>Owner</th>
- <th>Last Commit</th>
- </tr>
- </thead>
- <tbody>"""
+ <p>Listing {len(repos)} repositories</p>
+ </div>
+
+ <div class="repo-list">
+ <table class="repo-table">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Owner</th>
+ <th>Last Commit</th>
+ </tr>
+ </thead>
+ <tbody>"""
]
for repo in repos:
@@ -349,14 +349,12 @@ class HTMLGenerator:
pass
html_fragments.append(f"""
- <tr>
- <td class="repo-name">
- <a href="{repo['name']}/index.html" class="repo-link">{repo['name_escaped']}</a>
- </td>
- <td class="repo-description">{repo['description_escaped']}</td>
- <td class="repo-owner">{repo['owner_escaped']}</td>
- <td class="repo-last-commit"{date_style}>{last_commit_date}</td>
- </tr>
+ <tr>
+ <td class="repo-name"><a href="{repo['name']}/index.html" class="repo-link">{repo['name_escaped']}</a></td>
+ <td class="repo-description">{repo['description_escaped']}</td>
+ <td class="repo-owner">{repo['owner_escaped']}</td>
+ <td class="repo-last-commit"{date_style}>{last_commit_date}</td>
+ </tr>
""")
html_fragments.append(f"""
@@ -379,72 +377,72 @@ class HTMLGenerator:
f"""<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{repo['name_escaped']} - Repository Overview</title>
- <meta name="description" content="{repo['description']}">
- <link rel="stylesheet" href="../main.css">
-
- <!-- Open Graph -->
- <meta property="og:site_name" content="{BASE_NAME}">
- <meta property="og:url" content="{BASE_URL}/{repo['name']}">
- <meta property="og:title" content="{repo['name_escaped']} - Repository Overview">
- <meta property="og:description" content="{repo['description']}">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en_GB">
-
- <!-- Twitter Card -->
- <meta property="twitter:card" content="summary">
- <meta property="twitter:url" content="{BASE_URL}/{repo['name']}">
- <meta property="twitter:title" content="{repo['name_escaped']} - Repository Overview">
- <meta property="twitter:description" content="{repo['description']}">
-
- <!-- Microdata -->
- <script type="application/ld+json">
- {{
- "@context": "http://schema.org",
- "@type": "website",
- "name": "{repo['name_escaped']} - Repository Overview",
- "headline": "{repo['name_escaped']} - Repository Overview",
- "url": "{BASE_URL}/{repo['name']}",
- "description": "{repo['description']}"
- }}
- </script>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{repo['name_escaped']} - Repository Overview</title>
+ <meta name="description" content="{repo['description']}">
+ <link rel="stylesheet" href="../main.css">
+
+ <!-- Open Graph -->
+ <meta property="og:site_name" content="{BASE_NAME}">
+ <meta property="og:url" content="{BASE_URL}/{repo['name']}">
+ <meta property="og:title" content="{repo['name_escaped']} - Repository Overview">
+ <meta property="og:description" content="{repo['description']}">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en_GB">
+
+ <!-- Twitter Card -->
+ <meta property="twitter:card" content="summary">
+ <meta property="twitter:url" content="{BASE_URL}/{repo['name']}">
+ <meta property="twitter:title" content="{repo['name_escaped']} - Repository Overview">
+ <meta property="twitter:description" content="{repo['description']}">
+
+ <!-- Microdata -->
+ <script type="application/ld+json">
+ {{
+ "@context": "http://schema.org",
+ "@type": "website",
+ "name": "{repo['name_escaped']} - Repository Overview",
+ "headline": "{repo['name_escaped']} - Repository Overview",
+ "url": "{BASE_URL}/{repo['name']}",
+ "description": "{repo['description']}"
+ }}
+ </script>
</head>
<body>
- <div class="header">
+ <div class="header">
<h1><a href="../index.html" title="gitgen"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 21 21" width="38" height="38" fill="none" stroke="#222222" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4.13 1.101v12.56m11.972-6.28a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28M4.13 19.94a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28" style="stroke-width:2.04357"/><path d="M13.109 4.241a8.978 9.42 0 0 0-8.978 9.42" style="stroke-width:2.04357"/><path stroke="#0f0" d="M16.172 13.915v6m3-3h-6"/><path stroke="red" d="M19.135 11.43h-6"/></svg></a> {BASE_NAME}</h1>
- <p>{repo['name_escaped']}</p>
- </div>
-
- <div class="breadcrumb">
- <a href="../index.html">← Back to All Repositories</a>
+ <p>{repo['name_escaped']}</p>
+ </div>
+
+ <div class="breadcrumb">
+ <a href="../index.html">← Back to All Repositories</a>
+ </div>
+
+ <div class="navigation">
+ <a href="index.html" class="nav-btn active">README</a>
+ <a href="files.html" class="nav-btn secondary">Files</a>
+ <a href="commits.html" class="nav-btn secondary">Commits</a>
+ </div>
+
+ <div class="repo-ov">
+ <div class="meta-item">
+ <strong>Branch: </strong>
+ <span class="branch-badge">{html.escape(repo.get('branch', 'main'))}</span>
+ <strong>Last commit: </strong>
+ <span>{repo.get('latest_commit', {}).get('date', 'N/A')}</span>
+ <strong>Clone: </strong>
+ <code>git clone {html.escape(repo['remote_url'])}</code>
</div>
+ </div>
- <div class="navigation">
- <a href="index.html" class="nav-btn active">README</a>
- <a href="files.html" class="nav-btn secondary">Files</a>
- <a href="commits.html" class="nav-btn secondary">Commits</a>
- </div>
+ <div class="readme-content">
+ {repo['readme_content'] if repo.get('readme_content') else '<p><em>No README file found in this repository.</em></p>'}
+ </div>
- <div class="repo-ov">
- <div class="meta-item">
- <strong>Branch: </strong>
- <span class="branch-badge">{html.escape(repo.get('branch', 'main'))}</span>
- <strong>Last commit: </strong>
- <span>{repo.get('latest_commit', {}).get('date', 'N/A')}</span>
- <strong>Clone: </strong>
- <code>git clone {html.escape(repo['remote_url'])}</code>
- </div>
- </div>
-
- <div class="readme-content">
- {repo['readme_content'] if repo.get('readme_content') else '<p><em>No README file found in this repository.</em></p>'}
- </div>
-
- <div class="footer">
- <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
- </div>
+ <div class="footer">
+ <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
+ </div>
</body>
</html>"""
]
@@ -462,56 +460,56 @@ class HTMLGenerator:
f"""<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{repo['name_escaped']} - Files</title>
- <meta name="description" content="Files list for repo: {repo['name_escaped']}">
- <link rel="stylesheet" href="../main.css">
-
- <!-- Open Graph -->
- <meta property="og:site_name" content="{BASE_NAME}">
- <meta property="og:url" content="{BASE_URL}/{repo['name']}/files.html">
- <meta property="og:title" content="{repo['name_escaped']} - Files list">
- <meta property="og:description" content="Files list for repo: {repo['name_escaped']}">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en_GB">
-
- <!-- Twitter Card -->
- <meta property="twitter:card" content="summary">
- <meta property="twitter:url" content="{BASE_URL}/{repo['name']}/files.html">
- <meta property="twitter:title" content="{repo['name_escaped']} - Files list">
- <meta property="twitter:description" content="Files list for repo: {repo['name_escaped']}">
-
- <!-- Microdata -->
- <script type="application/ld+json">
- {{
- "@context": "http://schema.org",
- "@type": "website",
- "name": "{repo['name_escaped']} - Files list",
- "headline": "{repo['name_escaped']} - Files list",
- "url": "{BASE_URL}/{repo['name']}/files.html",
- "description": "Files list for repo: {repo['name_escaped']}"
- }}
- </script>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{repo['name_escaped']} - Files</title>
+ <meta name="description" content="Files list for repo: {repo['name_escaped']}">
+ <link rel="stylesheet" href="../main.css">
+
+ <!-- Open Graph -->
+ <meta property="og:site_name" content="{BASE_NAME}">
+ <meta property="og:url" content="{BASE_URL}/{repo['name']}/files.html">
+ <meta property="og:title" content="{repo['name_escaped']} - Files list">
+ <meta property="og:description" content="Files list for repo: {repo['name_escaped']}">
+ <meta property="og:type" content="website">
+ <meta property="og:locale" content="en_GB">
+
+ <!-- Twitter Card -->
+ <meta property="twitter:card" content="summary">
+ <meta property="twitter:url" content="{BASE_URL}/{repo['name']}/files.html">
+ <meta property="twitter:title" content="{repo['name_escaped']} - Files list">
+ <meta property="twitter:description" content="Files list for repo: {repo['name_escaped']}">
+
+ <!-- Microdata -->
+ <script type="application/ld+json">
+ {{
+ "@context": "http://schema.org",
+ "@type": "website",
+ "name": "{repo['name_escaped']} - Files list",
+ "headline": "{repo['name_escaped']} - Files list",
+ "url": "{BASE_URL}/{repo['name']}/files.html",
+ "description": "Files list for repo: {repo['name_escaped']}"
+ }}
+ </script>
</head>
<body>
- <div class="header">
+ <div class="header">
<h1><a href="../index.html" title="gitgen"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 21 21" width="38" height="38" fill="none" stroke="#222222" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4.13 1.101v12.56m11.972-6.28a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28M4.13 19.94a2.993 3.14 0 1 0 0-6.28 2.993 3.14 0 0 0 0 6.28" style="stroke-width:2.04357"/><path d="M13.109 4.241a8.978 9.42 0 0 0-8.978 9.42" style="stroke-width:2.04357"/><path stroke="#0f0" d="M16.172 13.915v6m3-3h-6"/><path stroke="red" d="M19.135 11.43h-6"/></svg></a> {BASE_NAME}</h1>
- <p>{repo['name_escaped']} - {len(files):,} files</p>
- </div>
+ <p>{repo['name_escaped']} - {len(files):,} files</p>
+ </div>
- <div class="breadcrumb">
- <a href="../index.html">← All Repositories</a> •
- <a href="index.html">← {repo['name_escaped']} Overview</a>
- </div>
+ <div class="breadcrumb">
+ <a href="../index.html">← All Repositories</a> •
+ <a href="index.html">← {repo['name_escaped']} Overview</a>
+ </div>
- <div class="navigation">
- <a href="index.html" class="nav-btn secondary">README</a>
- <a href="files.html" class="nav-btn active">Files</a>
- <a href="commits.html" class="nav-btn secondary">Commits</a>
- </div>
+ <div class="navigation">
+ <a href="index.html" class="nav-btn secondary">README</a>
+ <a href="files.html" class="nav-btn active">Files</a>
+ <a href="commits.html" class="nav-btn secondary">Commits</a>
+ </div>
- <div class="file-list">
+ <div class="file-list">
"""
]
@@ -520,29 +518,29 @@ class HTMLGenerator:
html_fragments.append(f'<div class="directory">📁 {html.escape(directory) if directory != "." else "Root Directory"}</div>\n')
for file_info in files_by_dir[directory]:
html_fragments.append(f"""
- <div class="file-item">
- <div class="file-info">
- <div class="file-path">
- <span class="file-icon">🗎</span>
- {file_info['name']}
- </div>
- </div>
+ <div class="file-item">
+ <div class="file-info">
+ <div class="file-path">
+ <span class="file-icon">🗎</span>
+ {file_info['name']}
+ </div>
</div>
+ </div>
""")
else:
html_fragments.append("""
- <div style="padding: 3rem; text-align: center; color: #718096;">
- <p style="font-size: 1.2rem; margin-bottom: 1rem;">No files found in this repository.</p>
- <p>This repository might be empty.</p>
- </div>
+ <div style="padding: 3rem; text-align: center; color: #718096;">
+ <p style="font-size: 1.2rem; margin-bottom: 1rem;">No files found in this repository.</p>
+ <p>This repository might be empty.</p>
+ </div>
""")
html_fragments.append(f"""
- </div>
+ </div>
- <div class="footer">
- <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
- </div>
+ <div class="footer">
+ <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
+ </div>
</body>
</html>""")
@@ -660,9 +658,9 @@ class HTMLGenerator:
html_fragments.append(f"""
</div>
- <div class="footer">
- <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
- </div>
+ <div class="footer">
+ <p>Made with <a href="https://git.cybrkyd.com/GitGen" target="_blank" rel="noopener">GitGen</a> by Cybrkyd</p>
+ </div>
</body>
</html>""")