diff --git a/main.go b/main.go index e8753be..6b58fd5 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ import ( type Settings struct { Port string `envconfig:"PORT" default:"2999"` DiskCachePath string `envconfig:"DISK_CACHE_PATH" default:"/tmp/njump-cache"` - CanonicalHost string `envconfig:"DOMAIN" default:"njump.me"` + Domain string `envconfig:"DOMAIN" default:"njump.me"` } //go:embed static/* @@ -56,7 +56,7 @@ func main() { return } else { if canonicalHost := os.Getenv("CANONICAL_HOST"); canonicalHost != "" { - s.CanonicalHost = canonicalHost + s.Domain = canonicalHost } } diff --git a/render_robots.go b/render_robots.go index e73fb23..d2372d9 100644 --- a/render_robots.go +++ b/render_robots.go @@ -12,5 +12,5 @@ Allow: / Sitemap: https://{{%s}}/npubs-archive.xml Sitemap: https://{{%s}}/relays-archive.xml -`, s.CanonicalHost, s.CanonicalHost) +`, s.Domain, s.Domain) } diff --git a/templates/homepage.html b/templates/homepage.html index 72dac62..16461ab 100644 --- a/templates/homepage.html +++ b/templates/homepage.html @@ -26,7 +26,7 @@ (yet) working.

- njump currently lives under {{ s.CanonicalHost }}, you can + njump currently lives under {{ s.Domain }}, you can reach it appending a Nostr NIP-19npub, nevent, naddr, etc) after the domain: {{ s.CanonicalHost }}/<nip-19-entity>{{ s.Domain }}/<nip-19-entity>.

@@ -63,7 +63,7 @@

-
{{ s.CanonicalHost }}/
+
{{ s.Domain }}/
NIP-05 inspired permalink: - {{ s.CanonicalHost }}/<nip-5>, + {{ s.Domain }}/<nip-5>, for example: - https://{{ s.CanonicalHost }}/nvk.org or + https://{{ s.Domain }}/nvk.org or https://{{ s.CanonicalHost }}/mike@mikedilger.comhttps://{{ s.Domain }}/mike@mikedilger.com.

@@ -168,10 +168,10 @@

You can have a view of the last content posted to a relay using {{ s.CanonicalHost }}/r/<relay-host>{{ s.Domain }}/r/<relay-host>, for example: https://{{ s.CanonicalHost }}/r/nostr.winehttps://{{ s.Domain }}/r/nostr.wine

diff --git a/templates/profile.html b/templates/profile.html index 40852c1..cda5ee1 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -28,7 +28,7 @@ {{if .Npub}} - https://{{s.CanonicalHost}}/{{.Npub | escapeString}} + https://{{s.Domain}}/{{.Npub | escapeString}} {{.ModifiedAt | escapeString}} daily 0.8 @@ -10,7 +10,7 @@ {{end}} {{if .Hostname}} - https://{{s.CanonicalHost}}/r/{{.Hostname | escapeString}} + https://{{s.Domain}}/r/{{.Hostname | escapeString}} {{.ModifiedAt | escapeString}} daily 0.8 @@ -19,7 +19,7 @@ {{if .LastNotes}} {{range .LastNotes}} - https://{{s.CanonicalHost}}/{{.Nevent | escapeString}} + https://{{s.Domain}}/{{.Nevent | escapeString}} {{.ModifiedAt | escapeString}} never 0.5 @@ -29,7 +29,7 @@ {{if .Data}} {{range $element := .Data }} - https://{{s.CanonicalHost}}/{{$.PathPrefix}}{{$element | trimProtocol | escapeString}} + https://{{s.Domain}}/{{$.PathPrefix}}{{$element | trimProtocol | escapeString}} {{$.ModifiedAt | escapeString}} daily 0.5