Skip to content

Commit

Permalink
Switch social thumbnails to use featuredImage. Give the Backstage/Lin…
Browse files Browse the repository at this point in the history
…kerd social preview a better featuredImage

Signed-off-by: Flynn <[email protected]>
  • Loading branch information
kflynn committed May 23, 2024
1 parent 0e6c6dc commit 1033a6a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion linkerd.io/content/blog/2024/0524-backstage-and-linkerd.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags:
description: This CNCF Cloud Native Live session explores building a rock-solid Internal Developer Platform (IDP) Backstage that empowers developers with self-service tools while streamlining security and observability.
keywords: [Backstage; Video]
thumbnail: '/uploads/2024/05/cnl-backstage-linkerd-thumbnail.png'
featuredImage: '/uploads/2024/05/cnl-backstage-linkerd-thumbnail.png'
featuredImage: '/uploads/2024/05/cnl-backstage-linkerd-screenshot.png'
---
Smooth workflows are critical in the cloud-native world. This CNCF Cloud
Native Live session explores building a rock-solid Internal Developer
Expand Down
4 changes: 3 additions & 1 deletion linkerd.io/layouts/partials/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Page.RelPermalink | absURL }}" />

{{ if .Params.thumbnail }}
{{ if .Params.featuredImage }}
<meta property="og:image" content="{{ .Params.featuredImage| absURL | safeHTMLAttr }}" />
{{ else if .Params.thumbnail }}
<meta property="og:image" content="{{ .Params.thumbnail | absURL | safeHTMLAttr }}" />
{{ else }}
<meta property="og:image" content="https://linkerd.io/images/logo-only-200h.png" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions linkerd.io/themes/buoyant/layouts/partials/twitter-cards.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{{ with .Params.thumbnail }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ . | absURL }}"/>
{{ if .Params.featuredImage }}
{{ with .Params.featuredImage }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ . | absURL }}"/>
{{ end }}
{{ else if .Params.thumbnail }}
{{ with .Params.thumbnail }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ . | absURL }}"/>
{{ end }}
{{ else }}
{{ $images := $.Resources.ByType "image" }}
{{ $featured := index $images 0 }}
Expand Down

0 comments on commit 1033a6a

Please sign in to comment.