mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 22:34:25 +01:00
use name= everywhere for twitter og tags and make tests pass.
This commit is contained in:
@@ -55,7 +55,7 @@ func TestNoteWithTextImage(t *testing.T) {
|
|||||||
|
|
||||||
assert.Contains(t, og.Image, "/njump/image/nevent1qqs860kwt3m500hfnve6vxdpagkfqkm6hq03dnn2n7u8dev580kd2uszyztuwzjyxe4x2dwpgken87tna2rdlhpd02va5cvvgrrywpddnr3jydc2w4t", "")
|
assert.Contains(t, og.Image, "/njump/image/nevent1qqs860kwt3m500hfnve6vxdpagkfqkm6hq03dnn2n7u8dev580kd2uszyztuwzjyxe4x2dwpgken87tna2rdlhpd02va5cvvgrrywpddnr3jydc2w4t", "")
|
||||||
assert.Equal(t, og.TwitterCard, "summary_large_image", "")
|
assert.Equal(t, og.TwitterCard, "summary_large_image", "")
|
||||||
assert.Contains(t, og.Text, "Thanks, it's of course a work in progress", "")
|
assert.Contains(t, og.Text, "seen on", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeRequest(t *testing.T, path string) *OpengraphFields {
|
func makeRequest(t *testing.T, path string) *OpengraphFields {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- otherwise we tell twitter to display it as a normal text-based embed.
|
<!-- otherwise we tell twitter to display it as a normal text-based embed.
|
||||||
these distinctions don't seem to make any difference in other platforms,
|
these distinctions don't seem to make any difference in other platforms,
|
||||||
maybe telegram -->
|
maybe telegram -->
|
||||||
<meta property="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
{{ if not (eq "" .Image) }}
|
{{ if not (eq "" .Image) }}
|
||||||
<meta property="og:image" content="{{.Image}}" />
|
<meta property="og:image" content="{{.Image}}" />
|
||||||
<meta name="twitter:image" content="{{.ProxiedImage}}" />
|
<meta name="twitter:image" content="{{.ProxiedImage}}" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
{{end}} {{ if not (eq "" .Metadata.About) }}
|
{{end}} {{ if not (eq "" .Metadata.About) }}
|
||||||
<meta property="og:description" content="{{.Metadata.About}}" />
|
<meta property="og:description" content="{{.Metadata.About}}" />
|
||||||
{{end}}
|
{{end}}
|
||||||
<meta property="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
|
|
||||||
<link rel="canonical" href="https://njump.me/{{.Npub}}" />
|
<link rel="canonical" href="https://njump.me/{{.Npub}}" />
|
||||||
<link
|
<link
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<meta property="og:site_name" content="{{.Hostname}} - nostr relay" />
|
<meta property="og:site_name" content="{{.Hostname}} - nostr relay" />
|
||||||
{{ if not (eq "" .Info.Icon) }}
|
{{ if not (eq "" .Info.Icon) }}
|
||||||
<meta property="og:image" content="{{.Info.Icon}}" />
|
<meta property="og:image" content="{{.Info.Icon}}" />
|
||||||
<meta property="twitter:image" content="{{.Proxy}}{{.Info.Icon}}" />
|
<meta name="twitter:image" content="{{.Proxy}}{{.Info.Icon}}" />
|
||||||
{{end}} {{ if not (eq "" .Info.Description) }}
|
{{end}} {{ if not (eq "" .Info.Description) }}
|
||||||
<meta property="og:description" content="{{.Info.Description}}" />
|
<meta property="og:description" content="{{.Info.Description}}" />
|
||||||
<meta name="twitter:description" content="{{.Info.Description}}" />
|
<meta name="twitter:description" content="{{.Info.Description}}" />
|
||||||
{{end}}
|
{{end}}
|
||||||
<meta property="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
|
|
||||||
<link
|
<link
|
||||||
rel="sitemap"
|
rel="sitemap"
|
||||||
|
|||||||
Reference in New Issue
Block a user