mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +01:00
Fix relay sitemap after the /r/... switch
This commit is contained in:
@@ -16,7 +16,7 @@ func renderRelayPage(w http.ResponseWriter, r *http.Request) {
|
|||||||
hostname := code[2:]
|
hostname := code[2:]
|
||||||
typ := "relay"
|
typ := "relay"
|
||||||
if strings.HasSuffix(hostname, ".xml") {
|
if strings.HasSuffix(hostname, ".xml") {
|
||||||
hostname = code[:len(hostname)-4]
|
hostname = hostname[:len(hostname)-4]
|
||||||
typ = "relay_sitemap"
|
typ = "relay_sitemap"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
<meta property="twitter:card" content="summary" />
|
<meta property="twitter:card" content="summary" />
|
||||||
|
|
||||||
<link rel="sitemap" type="application/xml" title="Sitemap for {{.hostname | escapeString}}" href="/{{.hostname | escapeString}}.xml">
|
<link rel="sitemap" type="application/xml" title="Sitemap for {{.hostname | escapeString}}" href="/r/{{.hostname | escapeString}}.xml">
|
||||||
|
|
||||||
{{template "head_common.html" }}
|
{{template "head_common.html" }}
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
<url>
|
<url>
|
||||||
{{if .npub}}<loc>https://nostr.com/{{.npub | escapeString}}</loc>{{end}}
|
{{if .npub}}<loc>https://nostr.com/{{.npub | escapeString}}</loc>{{end}}
|
||||||
{{if .hostname}}<loc>https://nostr.com/{{.hostname | escapeString}}</loc>{{end}}
|
{{if .hostname}}<loc>https://nostr.com/r/{{.hostname | escapeString}}</loc>{{end}}
|
||||||
<lastmod>{{.modifiedAt | escapeString}}</lastmod>
|
<lastmod>{{.modifiedAt | escapeString}}</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
<priority>0.8</priority>
|
<priority>0.8</priority>
|
||||||
|
|||||||
Reference in New Issue
Block a user