mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +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.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 {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- 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,
|
||||
maybe telegram -->
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{{ if not (eq "" .Image) }}
|
||||
<meta property="og:image" content="{{.Image}}" />
|
||||
<meta name="twitter:image" content="{{.ProxiedImage}}" />
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{end}} {{ if not (eq "" .Metadata.About) }}
|
||||
<meta property="og:description" content="{{.Metadata.About}}" />
|
||||
{{end}}
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
<link rel="canonical" href="https://njump.me/{{.Npub}}" />
|
||||
<link
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<meta property="og:site_name" content="{{.Hostname}} - nostr relay" />
|
||||
{{ if not (eq "" .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) }}
|
||||
<meta property="og:description" content="{{.Info.Description}}" />
|
||||
<meta name="twitter:description" content="{{.Info.Description}}" />
|
||||
{{end}}
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
<link
|
||||
rel="sitemap"
|
||||
|
||||
Reference in New Issue
Block a user