Skip to content

Commit 5fdba80

Browse files
committed
Test updated opengraph tags
1 parent be5a149 commit 5fdba80

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

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

-56
Original file line numberDiff line numberDiff line change
@@ -50,59 +50,3 @@
5050
<meta property="twitter:url" content="{{ .Permalink }}" />
5151
<meta name="twitter:title" content="{{ if .Params.title }}{{ .Params.title }}{{ else }}Open Neuromorphic{{ end }}" />
5252
<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 }}" />
53-
<meta name="twitter:image" content="{{ if .Params.image }}{{ .Params.image }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
54-
55-
{{ $imagePath := site.Params.metadata.image }}
56-
{{ if .Params.meta_image }}
57-
{{ $imagePath = .Params.meta_image }}
58-
{{ else if .Params.images }}
59-
{{ range first 1 .Params.images }}
60-
{{ $imagePath = . }}
61-
{{ end }}
62-
{{ else if .Params.image }}
63-
{{ $imagePath = .Params.image }}
64-
{{ end }}
65-
66-
{{ if or (hasPrefix $imagePath "http") (fileExists (add `static/` (string $imagePath))) }}
67-
<meta name="twitter:image" content="{{ $imagePath | absURL }}" />
68-
<meta property="og:image" content="{{ $imagePath | absURL }}" />
69-
{{ else }}
70-
{{ $contentImage:= .Resources.GetMatch (printf "*%s*" $imagePath) }}
71-
{{ $assetImage:= fileExists (add `assets/` (string $imagePath)) }}
72-
73-
{{ if or $contentImage $assetImage }}
74-
{{ if $contentImage }}
75-
{{ .Scratch.Set "image-exists" $contentImage }}
76-
{{ else if $assetImage }}
77-
{{ .Scratch.Set "image-exists" (resources.Get $imagePath) }}
78-
{{ end }}
79-
80-
{{ $image:= .Scratch.Get "image-exists" }}
81-
82-
{{ $imageExt:= path.Ext $image }}
83-
84-
{{ if ne $imageExt `.svg` }}
85-
{{ $imageWidth := $image.Width }}
86-
{{ $imageHeight := $image.Height }}
87-
{{ if (and (gt $imageWidth 144) (gt $imageHeight 144)) }}
88-
<meta property="og:image" content="{{ $image.Permalink }}" />
89-
<meta name="twitter:image" content="{{ $image.Permalink }}" />
90-
<meta name="twitter:card" content="{{- if (and (gt $imageWidth 300) (gt $imageHeight 157) (not (eq $imageWidth $imageHeight))) -}}summary_large_image{{- else -}}summary{{- end -}}" />
91-
{{ end }}
92-
<meta property="og:image:width" content="{{ $imageWidth }}" />
93-
<meta property="og:image:height" content="{{ $imageHeight }}" />
94-
{{ end }}
95-
96-
<meta property="og:image:type" content="image/{{- if eq $imageExt `.svg` -}} svg+xml {{- else -}} {{ replaceRE `^jpg$` `jpeg` $imageExt }} {{- end -}}" />
97-
{{ end }}
98-
{{ end }}
99-
<meta property="og:description" content="{{ if .Params.og_description }}{{ .Params.og_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 }}" />
100-
101-
<meta name="twitter:description" content="{{ if .Params.twitter_description }}{{ .Params.twitter_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 }}" />
102-
103-
{{ with site.Params.metadata.twitter }}
104-
<meta name="twitter:site" content="@{{ . }}" />
105-
{{ end }}
106-
{{ with site.Params.metadata.author }}
107-
<meta name="twitter:creator" content="@{{ . }}" />
108-
{{ end }}

0 commit comments

Comments
 (0)