Skip to content

Commit 7c2d311

Browse files
committed
Test updated opengraph tags
1 parent 6650e96 commit 7c2d311

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

themes/hugoplate/layouts/partials/components/base-seo.html

+2-18
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,5 @@
5050
<meta name="twitter:title" content="{{ if .Params.title }}{{ .Params.title }}{{ else }}Open Neuromorphic{{ end }}" />
5151
<meta name="twitter:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}Explore the world of Neuromorphic Computing, AI, and Devices in an open-source community. Join us for educational content, and collaborative innovation{{ end }}" />
5252

53-
{{ $imagePath := site.Params.metadata.image }}
54-
{{ if .Params.meta_image }}
55-
{{ $imagePath = .Params.meta_image }}
56-
{{ else if .Params.images }}
57-
{{ range first 1 .Params.images }}
58-
{{ $imagePath = . }}
59-
{{ end }}
60-
{{ else if .Params.image }}
61-
{{ $imagePath = .Params.image }}
62-
{{ end }}
63-
64-
{{ if or (hasPrefix $imagePath "http") (fileExists (add `static/` (string $imagePath))) }}
65-
<meta name="twitter:image" content="{{ $imagePath }}" />
66-
<meta property="og:image" content="{{ $imagePath }}" />
67-
{{ else }}
68-
<meta name="twitter:image" content="{{ if .Params.image }}{{ .Params.image }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
69-
<meta property="og:image" content="{{ if .Params.image }}{{ .Params.image }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
70-
{{ end }}
53+
<meta property="og:image" content="{{ if .Params.image }}{{ .Params.image | absURL }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
54+
<meta name="twitter:image" content="{{ if .Params.image }}{{ .Params.image | absURL }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />

0 commit comments

Comments
 (0)