Skip to content

Commit 5410901

Browse files
committed
Test updated opengraph tags
1 parent fa6a677 commit 5410901

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

content/english/neuromorphic-computing/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Neuromorphic Computing
33
description: Dive into neuromorphic hardware and software guides, and more. Explore the convergence of biology-inspired principles and cutting-edge technology.
44
draft: false
5-
image: "image.jpeg"
5+
image: "/img/neuromorphic-computing.jpeg"
66
sections:
77
- title: "Neuromorphic Hardware Guide"
88
url: "hardware/"
116 KB
Loading

static/img/neuromorphic-hardware.jpeg

123 KB
Loading

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

+19-1
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,28 @@
4343
<meta property="og:url" content="{{ .Permalink }}" />
4444
<meta property="og:title" content="{{ if .Params.title }}{{ .Params.title }}{{ else }}Open Neuromorphic{{ end }}" />
4545
<meta property="og: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 }}" />
46-
<meta property="og:image" content="{{ if .Params.image }}{{ .Params.image }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
4746

4847
<meta name="twitter:card" content="summary_large_image" />
4948
<meta property="twitter:domain" content="open-neuromorphic.org" />
5049
<meta property="twitter:url" content="{{ .Permalink }}" />
5150
<meta name="twitter:title" content="{{ if .Params.title }}{{ .Params.title }}{{ else }}Open Neuromorphic{{ end }}" />
5251
<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 }}" />
52+
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 property="twitter:image" content="{{ if .Params.image }}{{ .Params.image }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
66+
<meta name="twitter:image" content="{{ $imagePath | absURL }}" />
67+
<meta property="og:image" content="{{ $imagePath | absURL }}" />
68+
{{ else }}
69+
<meta name="twitter:image" content="{{ if .Params.image }}{{ .Params.image }}{{ else }}https://open-neuromorphic.org/images/og-image.png{{ end }}" />
70+
{{ end }}

0 commit comments

Comments
 (0)