feat: GitHub stars badge on open-source projects via shields.io

- New openSource field in project model distinguishes OS from private
- shields.io badge shows live star count for open-source projects
- SoundInbox marked as NOT open source (no badge, no stars)
- Immich Photo Manager, Cmux Resurrect, Gotify Commander, CDC Starter Kit → open source
- Stars badge hidden in print view
This commit is contained in:
juanatsap
2026-05-04 13:42:40 +01:00
parent c1a32988cb
commit 9a2343a71e
8 changed files with 37 additions and 0 deletions
+9
View File
@@ -68,6 +68,15 @@ func (m *Manager) loadTemplatesLocked() error {
"replaceDrolosoft": func(s string) string {
return strings.Replace(s, "drolosoft", `<a href="https://drolosoft.com" target="_blank" rel="noopener noreferrer">drolosoft</a>`, 1)
},
// githubRepo extracts "owner/repo" from a GitHub URL
"githubRepo": func(url string) string {
url = strings.TrimSuffix(url, "/")
parts := strings.Split(url, "github.com/")
if len(parts) == 2 {
return parts[1]
}
return ""
},
// dict creates a map from key-value pairs for passing to sub-templates
"dict": func(values ...interface{}) (map[string]interface{}, error) {
if len(values)%2 != 0 {