mirror of
https://github.com/go-i2p/go-gh-page.git
synced 2025-06-30 20:53:02 -04:00
Deploy site generated on f2aa3b798c
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto
|
493
index.html
Normal file
493
index.html
Normal file
@ -0,0 +1,493 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>go-i2p/go-gh-page</title>
|
||||
<style>
|
||||
/* Base styles */
|
||||
:root {
|
||||
--primary-color: #0366d6;
|
||||
--secondary-color: #586069;
|
||||
--background-color: #ffffff;
|
||||
--sidebar-bg: #f6f8fa;
|
||||
--border-color: #e1e4e8;
|
||||
--hover-color: #f1f1f1;
|
||||
--text-color: #24292e;
|
||||
--sidebar-width: 260px;
|
||||
--breakpoint: 768px;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
padding-bottom: 0.3em;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
padding-bottom: 0.3em;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
line-height: 1.45;
|
||||
background-color: var(--sidebar-bg);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0.2em 0.4em;
|
||||
margin: 0;
|
||||
background-color: rgba(27, 31, 35, 0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
table tr {
|
||||
background-color: var(--background-color);
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
table tr:nth-child(2n) {
|
||||
background-color: var(--sidebar-bg);
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.nav-sidebar {
|
||||
width: var(--sidebar-width);
|
||||
background-color: var(--sidebar-bg);
|
||||
border-right: 1px solid var(--border-color);
|
||||
overflow-y: auto;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
padding: 40px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
.repo-info {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.repo-info h2 {
|
||||
margin: 0;
|
||||
border: none;
|
||||
font-size: 1.25em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.repo-meta {
|
||||
font-size: 0.9em;
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.nav-links li {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
display: block;
|
||||
padding: 6px 8px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.nav-links a:hover {
|
||||
background-color: var(--hover-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-links a.active {
|
||||
font-weight: 600;
|
||||
background-color: rgba(3, 102, 214, 0.1);
|
||||
}
|
||||
|
||||
.nav-section-title {
|
||||
font-weight: 600;
|
||||
margin: 16px 0 8px 0;
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.nav-footer {
|
||||
margin-top: 20px;
|
||||
font-size: 0.9em;
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
|
||||
/* Repository sections */
|
||||
.repo-header {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.repo-stats {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.repo-stat {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.repo-section {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.contributors-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.contributor-item {
|
||||
flex: 1 1 calc(33% - 20px);
|
||||
min-width: 200px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 3px;
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
.contributor-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.contributor-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.contributor-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.contributor-commits {
|
||||
font-size: 0.9em;
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
margin-top: 40px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
color: var(--secondary-color);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Mobile responsive */
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.nav-sidebar {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: relative;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.contributor-item {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="nav-sidebar">
|
||||
<div class="repo-info">
|
||||
<h2>
|
||||
<a href="index.html">go-i2p/go-gh-page</a>
|
||||
</h2>
|
||||
<div class="repo-meta">
|
||||
📝 7 commits
|
||||
• 📜 MIT License
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li><a href="index.html" class="active">Repository Overview</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="nav-footer">
|
||||
<a href="https://github.com/go-i2p/go-gh-page" target="_blank">View on GitHub</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="main-content">
|
||||
<header class="repo-header">
|
||||
<h1>go-i2p/go-gh-page</h1>
|
||||
<div class="repo-description">A tool that automatically generates GitHub Pages static websites from repository content. It converts your repository's Markdown files to HTML with...</div>
|
||||
|
||||
<div class="repo-stats">
|
||||
|
||||
<div class="repo-stat">
|
||||
<span>📝</span> <span>7 commits</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="repo-stat">
|
||||
<span>📅</span> <span>Last updated: May 5, 2025</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="repo-stat">
|
||||
<span>📜</span> <span>MIT License</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
|
||||
<section id="readme" class="repo-section">
|
||||
<h2>README</h2>
|
||||
<div class="readme-content">
|
||||
<h1 id="go-gh-page">go-gh-page</h1>
|
||||
|
||||
<p>A tool that automatically generates GitHub Pages static websites from repository content. It converts your repository’s Markdown files to HTML with a consistent layout, handles navigation, and preserves your documentation structure.</p>
|
||||
|
||||
<h2 id="features">Features</h2>
|
||||
|
||||
<ul>
|
||||
<li>Generates a complete static website from your repository’s content</li>
|
||||
<li>Converts Markdown files to HTML with proper rendering</li>
|
||||
<li>Creates navigation structure based on your documentation</li>
|
||||
<li>Displays repository information (commits, contributors, license)</li>
|
||||
<li>Preserves images and handles relative links</li>
|
||||
<li>Supports custom templates and styles</li>
|
||||
<li>Includes GitHub Actions workflow for automatic deployment</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="installation">Installation</h2>
|
||||
|
||||
<pre><code class="language-bash">go install github.com/go-i2p/go-gh-page/cmd/github-site-gen@latest
|
||||
</code></pre>
|
||||
|
||||
<h2 id="usage">Usage</h2>
|
||||
|
||||
<h3 id="basic-usage">Basic Usage</h3>
|
||||
|
||||
<p>Generate a site for a GitHub repository:</p>
|
||||
|
||||
<pre><code class="language-bash">github-site-gen -repo owner/repo-name -output ./site
|
||||
</code></pre>
|
||||
|
||||
<h3 id="command-line-options">Command Line Options</h3>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flag</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>-repo</code></td>
|
||||
<td>GitHub repository in format ‘owner/repo-name’</td>
|
||||
<td>(Required)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-output</code></td>
|
||||
<td>Output directory for generated site</td>
|
||||
<td><code>./output</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-branch</code></td>
|
||||
<td>Branch to use</td>
|
||||
<td><code>main</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-workdir</code></td>
|
||||
<td>Working directory for cloning</td>
|
||||
<td>(Temporary directory)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-githost</code></td>
|
||||
<td>Git host to use</td>
|
||||
<td><code>github.com</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-main-template</code></td>
|
||||
<td>Path to custom main template</td>
|
||||
<td>(Built-in template)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-doc-template</code></td>
|
||||
<td>Path to custom documentation template</td>
|
||||
<td>(Built-in template)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>-style-template</code></td>
|
||||
<td>Path to custom style template</td>
|
||||
<td>(Built-in template)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 id="using-with-github-actions">Using with GitHub Actions</h3>
|
||||
|
||||
<p>The repository includes a GitHub Actions workflow file that can automatically generate and deploy your documentation to GitHub Pages.</p>
|
||||
|
||||
<ol>
|
||||
<li>Copy the <code>.github/workflows/page.yml</code> file to your repository</li>
|
||||
<li>Enable GitHub Pages on your repository (Settings → Pages → Source: gh-pages branch)</li>
|
||||
<li>Customize the workflow as needed</li>
|
||||
</ol>
|
||||
|
||||
<p>The workflow runs hourly by default and on pushes to the main branch, automatically updating your GitHub Pages.</p>
|
||||
|
||||
<h2 id="custom-templates">Custom Templates</h2>
|
||||
|
||||
<p>You can provide custom templates for different components of the generated site:</p>
|
||||
|
||||
<pre><code class="language-bash">github-site-gen -repo owner/repo-name -output ./site \
|
||||
-main-template path/to/main.html \
|
||||
-doc-template path/to/doc.html \
|
||||
-style-template path/to/style.css
|
||||
</code></pre>
|
||||
|
||||
<h2 id="license">License</h2>
|
||||
|
||||
<p>MIT License</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section id="contributors" class="repo-section">
|
||||
<h2>Top Contributors</h2>
|
||||
<div class="contributors-list">
|
||||
|
||||
<div class="contributor-item">
|
||||
<!-- Use first letter as avatar if no image available -->
|
||||
<div class="contributor-avatar">
|
||||
e
|
||||
</div>
|
||||
<div class="contributor-info">
|
||||
<div class="contributor-name">
|
||||
eyedeekay
|
||||
</div>
|
||||
<div class="contributor-commits">
|
||||
7 commits
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a href="https://github.com/go-i2p/go-gh-page/graphs/contributors" target="_blank">View all contributors on GitHub →</a>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="page-footer">
|
||||
<p>Generated on 2025-05-06 02:44:02 • <a href="https://github.com/go-i2p/go-gh-page" target="_blank">View on GitHub</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user