|
43 | 43 | <meta property="og:url" content="{{ .Permalink }}" />
|
44 | 44 | <meta property="og:title" content="{{ if .Params.title }}{{ .Params.title }}{{ else }}Open Neuromorphic{{ end }}" />
|
45 | 45 | <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 }}" /> |
47 | 46 |
|
48 | 47 | <meta name="twitter:card" content="summary_large_image" />
|
49 | 48 | <meta property="twitter:domain" content="open-neuromorphic.org" />
|
50 | 49 | <meta property="twitter:url" content="{{ .Permalink }}" />
|
51 | 50 | <meta name="twitter:title" content="{{ if .Params.title }}{{ .Params.title }}{{ else }}Open Neuromorphic{{ end }}" />
|
52 | 51 | <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