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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user