Fix urls
This commit is contained in:
parent
c31c6243da
commit
8c5b698acb
1 changed files with 2 additions and 3 deletions
|
@ -140,11 +140,10 @@ func downloadIcon(title, url string) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleSelfHostedIcons(icon, ext string) (string, string, string, string) {
|
func handleSelfHostedIcons(icon, ext string) (string, string, string, string) {
|
||||||
ext = strings.TrimPrefix(ext, ".")
|
|
||||||
title := strings.Replace(icon, "shi/", "", 1)
|
title := strings.Replace(icon, "shi/", "", 1)
|
||||||
url := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + ext + "/" + title
|
url := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + strings.TrimPrefix(ext, ".") + "/" + title
|
||||||
lightTitle := strings.Replace(title, ext, "-light.svg", 1)
|
lightTitle := strings.Replace(title, ext, "-light.svg", 1)
|
||||||
lightUrl := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + ext + "/" + lightTitle
|
lightUrl := "https://cdn.jsdelivr.net/gh/selfhst/icons/" + strings.TrimPrefix(ext, ".") + "/" + lightTitle
|
||||||
return title, url, lightTitle, lightUrl
|
return title, url, lightTitle, lightUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue