moved opengraph meta tags to another partial

This commit is contained in:
Gabriele Musco 2021-03-23 20:14:43 +01:00
parent 2bd9c95b46
commit a6e8d0fcd9
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
2 changed files with 28 additions and 16 deletions

View File

@ -28,20 +28,5 @@
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }} {{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
<link type=text/css rel=stylesheet href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" /> <link type=text/css rel=stylesheet href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" />
{{- partial "inject/head.html" . -}} {{- partial "inject/head.html" . -}}
<meta property="og:site_name" content='{{ .Site.Title | default "Ficurinia" }}' /> {{- partial "head_meta_opengraph.html" . -}}
{{ if .IsPage }}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="article" />
<meta property="article:author" content="{{ .Site.Params.Author }}" />
<meta property="article:published_time" content='{{ .Date.Format "2006-01-02T15:04:05Z-0700" }}' />
{{ range .Params.tags }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:image" content='{{ if .Params.Image }}{{ .Params.Image | absURL }}{{ else }}{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}{{ end }}' />
<meta property="og:description" content="{{ .Summary }}" />
{{ else }}
<meta property="og:image" content='{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}' />
{{ end }}
</head> </head>

View File

@ -0,0 +1,27 @@
<meta property="og:site_name"
content='{{ .Site.Title | default "Ficurinia" }}' />
{{ if .IsPage }}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="article" />
<meta
property="article:author" content="{{ .Site.Params.Author }}" />
<meta
property="article:published_time"
content='{{ .Date.Format "2006-01-02T15:04:05Z-0700" }}' />
{{ range .Params.tags }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:image"
content='{{ if .Params.Image }}{{ .Params.Image | absURL }}
{{ else }}{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}
{{ end }}' />
<meta property="og:description" content="{{ .Summary }}" />
{{ else }}
<meta property="og:title"
content='{{ .Site.Title | default "Ficurinia" }}' />
<meta property="og:type" content="blog" />
<meta property="og:image"
content='{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}' />
{{ end }}