penguin/flatgit

flatgit showcase

commit c70e961ce60fe4d55934d9e6e4efade94a061f37

author斟酌 鵬兄 <tgckpg@gmail.com>
date2026-06-21T03:24:35Z
subjectDefault branch should be master branch
commit c70e961ce60fe4d55934d9e6e4efade94a061f37
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2026-06-21T03:24:35Z

    Default branch should be master branch
---
 .github/workflows/ci.yml            |  4 ++--
 README.md                           |  6 +++++-
 internal/buildinfo/buildinfo_gen.go |  4 ++--
 internal/render/manifest.go         | 17 ++++++++---------
 internal/render/templates.go        |  5 ++++-
 5 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 44c3610..57dbc80 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,10 +3,10 @@ name: flatgit CI
 on:
   workflow_dispatch:
   push:
-    branches: ["main"]
+    branches: ["master"]
     tags: ["v*"]
   pull_request:
-    branches: ["main"]
+    branches: ["master"]
 
 permissions:
   contents: read
diff --git a/README.md b/README.md
index 6220eb7..1503fbc 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
 # flatgit
 
-`flatgit` is a static Git web generator with webhook-driven updates and an optional built-in file server.
+A static Git web generator with webhook-driven updates and an optional built-in file server.
+
+The main goal for this projects is to make bots and agents's life easier. Also to relief the stress on them crawling the [forge](https://en.wikipedia.org/wiki/Forge_(software)) platform interfaces.
+
+Each repository have a `manifest.json` that lists all available navigation paths.
 
 [Demo](https://sgit.k8s.astropenguin.net/tgckpg/flatgit/)
 
diff --git a/internal/buildinfo/buildinfo_gen.go b/internal/buildinfo/buildinfo_gen.go
index d079abc..67a5c25 100644
--- a/internal/buildinfo/buildinfo_gen.go
+++ b/internal/buildinfo/buildinfo_gen.go
@@ -2,6 +2,6 @@ package buildinfo
 
 const (
     Version     = "dev"
-    GitRevision = "34bbedf22eec0a64eafd23241d4225cbfe8fc707"
-    Timestamp   = "20260618.230137"
+    GitRevision = "b4a1f393e27b2bf688c26d7e367b2c19a8d93436"
+    Timestamp   = "20260619.073254"
 )
diff --git a/internal/render/manifest.go b/internal/render/manifest.go
index 3f1ca07..fda517c 100644
--- a/internal/render/manifest.go
+++ b/internal/render/manifest.go
@@ -22,15 +22,14 @@ type ManifestGenerator struct {
 }
 
 type ManifestRepository struct {
-	Name           string    `json:"name"`
-	FullName       string    `json:"fullname"`
-	Owner          string    `json:"owner,omitempty"`
-	Description    string    `json:"description,omitempty"`
-	DefaultBranch  string    `json:"default_branch"`
-	DefaultCommit  string    `json:"default_commit"`
-	DefaultRefSlug string    `json:"default_ref_slug"`
-	SitePath       string    `json:"site_path"`
-	GeneratedAt    time.Time `json:"generated_at"`
+	Name           string `json:"name"`
+	FullName       string `json:"fullname"`
+	Owner          string `json:"owner,omitempty"`
+	Description    string `json:"description,omitempty"`
+	DefaultBranch  string `json:"default_branch"`
+	DefaultCommit  string `json:"default_commit"`
+	DefaultRefSlug string `json:"default_ref_slug"`
+	SitePath       string `json:"site_path"`
 }
 
 type ManifestHumanRoutes struct {
diff --git a/internal/render/templates.go b/internal/render/templates.go
index 3a23b35..450f259 100644
--- a/internal/render/templates.go
+++ b/internal/render/templates.go
@@ -65,7 +65,10 @@ const refsTemplate = `{{define "pageTitle"}}{{.RepoManifest.Repository.FullName}
 <table>
 <tr><th>kind</th><th>name</th><th>commit</th></tr>
 {{range .Refs}}
-<tr><td><span class="pill">{{.Kind}}</span></td><td class="mono">{{.Short}}</td><td class="mono">{{.Commit}}</td></tr>
+<tr>
+<td><span class="pill">{{.Kind}}</span></td>
+<td class="mono"><a href="{{$.RepoManifest.Repository.SitePath}}commit/{{.Commit}}.html">{{.Short}}</a></td>
+<td class="mono"><a href="{{$.RepoManifest.Repository.SitePath}}commit/{{.Commit}}.html">{{.Commit}}</a></td></tr>
 {{end}}
 </table>
 {{end}}