1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 16:05:31 -04:00

fix open graph meta tags

This commit is contained in:
2019-10-28 23:45:00 -04:00
parent c79bba520b
commit e016910825
6 changed files with 27 additions and 12 deletions

View File

@@ -3,5 +3,4 @@
</html>
{{"<!--" | safeHTML}} {{ hugo.Environment }} {{"-->" | safeHTML}}
{{"<!--" | safeHTML}} {{ time.Now.UTC.Format "2006-01-02T15:04:05" }} {{"-->" | safeHTML}}
{{"<!--" | safeHTML}} {{ hugo.Version }} ({{ hugo.CommitHash }}) {{"-->" | safeHTML}}

View File

@@ -15,8 +15,19 @@
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta property="og:image" content="{{ if .Params.image }}{{ .Permalink }}images/{{ .Params.image }}{{ else }}{{ "me.jpg" | absURL }}{{ end }}">
<meta property="fb:admins" content="1329090853">
<meta property="fb:app_id" content="3357248167622283">
{{- if .IsPage }}
{{- if not .PublishDate.IsZero }}
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
{{- else if not .Date.IsZero }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
{{- end }}
{{- with .Site.Author.facebook }}
<meta property="article:author" content="https://www.facebook.com/{{ . }}">{{ end }}
{{- with .Params.tags }}{{ range . }}
<meta property="article:tag" content="{{ . }}">{{ end }}{{ end }}
{{- end }}
<meta property="fb:admins" content="{{ .Site.Author.facebook_id }}">
<meta property="fb:app_id" content="{{ .Site.Params.facebook_app_id }}">
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="{{ .Site.Params.domain }}">
<meta name="twitter:site" content="{{ .Site.Author.twitter }}">
@@ -25,7 +36,8 @@
<meta name="twitter:widgets:csp" content="on">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="alternate" type="application/rss+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS (dict "targetPath" "style.css" "outputStyle" "compact") }}<link rel="stylesheet" href="{{ $style.Permalink }}">
{{- $style := resources.Get "sass/main.scss" | resources.ToCSS (dict "targetPath" "style.css" "outputStyle" "compact") }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<link rel="icon" href="{{ "favicon-192.png" | absURL }}" sizes="192x192">
<link rel="icon" href="{{ "favicon-48.png" | absURL }}" sizes="48x48">