Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Garza committed Apr 17, 2024
1 parent 7bba001 commit ea9a69e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
15 changes: 11 additions & 4 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
{{ with .Description }}
<meta name="description" content="{{ . }}">
{{ else }}
{{ with .Site.Params.description }}
{{ with .Summary }}
<meta name="description" content="{{ . }}">
{{ else }}
{{ with .Site.Params.description }}
<meta name="description" content="{{ . }}">
{{ end }}
{{ end }}
{{ end }}

Expand All @@ -38,11 +42,14 @@

{{ with .Params.twitterImage }}
<meta property="og:image" content="{{ . | absURL }}">
<meta property="twitter:image" content="{{ . | absURL }}">
{{ else }}
{{ with .Site.Params.openGraphImage }}
<meta property="og:image" content="{{ . | absURL }}">
<meta property="twitter:image" content="{{ . | absURL }}">
<meta property="og:image" content="{{ . | absURL }}">
{{ else }}
{{ with .Site.Params.twitterImage }}
<meta name="description" content="{{ . }}">
{{ end }}
{{ end }}
{{ end }}
{{ end }}

Expand Down
10 changes: 3 additions & 7 deletions layouts/partials/twitter_cards.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- og:image tags are for Whatsapp sharing -->
<meta name="twitter:card" content="summary_large_image"/>
{{ with .Params.twitterImage }}
<meta name="twitter:image" content="{{ . | absURL }}"/>
<meta name="og:image" content="{{ . | absURL }}"/>

{{ else }}
Expand All @@ -15,8 +14,9 @@
{{ end }}

<!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
<meta name="og:title" content="{{ .Title }}"/>
<meta name="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>

{{ range .Params.authors }}
{{ with index $.Site.Data.authors . }}
{{ with .twitter }}<meta name="twitter:creator" content="@{{ . }}"/>{{ end }}
Expand All @@ -29,7 +29,3 @@
<meta name="twitter:site" content="@{{ .Site.Params.twitterSite }}"/>
{{ end }}
{{ with .Site.Social.twitter_domain }}<meta name="twitter:domain" content="{{ . }}"/>{{ end }}

<!-- Other Social data -->
<meta name="og:title" content="{{ .Title }}"/>
<meta name="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>

0 comments on commit ea9a69e

Please sign in to comment.