web frontend for git (tangled's grandpa)
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

config: fix go-import pretty url

+7 -4
+1 -1
config/config.go
··· 23 23 } `yaml:"meta"` 24 24 Misc struct { 25 25 GoImport struct { 26 - PrettyURL string `yaml:"string"` 26 + PrettyURL string `yaml:"prettyURL"` 27 27 } `yaml:"goImport"` 28 28 } `yaml:"misc"` 29 29 Server struct {
+6 -3
routes/routes.go
··· 114 114 } 115 115 116 116 cloneURL := fmt.Sprintf("https://%s/%s", d.c.Server.FQDN, name) 117 + prettyURL := d.c.Misc.GoImport.PrettyURL 117 118 118 - if d.c.Misc.GoImport.PrettyURL == "" { 119 - d.c.Misc.GoImport.PrettyURL = cloneURL 119 + if prettyURL == "" { 120 + prettyURL = cloneURL 121 + } else { 122 + prettyURL = filepath.Join(prettyURL, name) 120 123 } 121 124 122 125 goImport := fmt.Sprintf(`<meta name="go-import" content="%s git %s">`, 123 - d.c.Misc.GoImport.PrettyURL, cloneURL) 126 + prettyURL, cloneURL) 124 127 125 128 tpath := filepath.Join(d.c.Dirs.Templates, "*") 126 129 t := template.Must(template.ParseGlob(tpath))