mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 17:25:30 -04:00
clean up a bunch of layouts, especially social-images function
also made even more config.toml parameters optional, will help when finally releasing theme
This commit is contained in:
@@ -5,11 +5,13 @@
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
|
||||
<meta property="og:image" content="{{ .Scratch.Get "socialImage_url" | absURL }}">
|
||||
<meta property="og:image:type" content="{{ .Scratch.Get "socialImage_type" }}">
|
||||
<meta property="og:image:width" content="{{ .Scratch.Get "socialImage_width" }}">
|
||||
<meta property="og:image:height" content="{{ .Scratch.Get "socialImage_height" }}">
|
||||
<meta property="og:image:alt" content="{{ .Title }}">
|
||||
{{- with .Scratch.Get "pageImage" }}
|
||||
<meta property="og:image" content="{{ .Permalink }}">
|
||||
<meta property="og:image:type" content="{{ .MediaType }}">
|
||||
<meta property="og:image:width" content="{{ .Width }}">
|
||||
<meta property="og:image:height" content="{{ .Height }}">
|
||||
<meta property="og:image:alt" content="{{ $.Title }}">
|
||||
{{ end -}}
|
||||
|
||||
{{- if and .IsPage (eq .Type .Site.Params.mainSection) }}
|
||||
{{- if not .PublishDate.IsZero }}
|
||||
@@ -23,16 +25,16 @@
|
||||
<meta property="article:author" content="https://www.facebook.com/{{ . }}">{{ end }}
|
||||
{{- with .Params.tags }}{{ range . }}
|
||||
<meta property="article:tag" content="{{ . }}">{{ end }}{{ end }}
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Site.Author.facebookid }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.facebookAppID }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
||||
|
||||
<meta name="twitter:card" content="{{ if .IsPage }}summary_large_image{{ else }}summary{{ end }}">
|
||||
<meta name="twitter:domain" content="{{ .Site.Params.domain }}">
|
||||
<meta name="twitter:domain" content="{{ (urls.Parse .Site.BaseURL).Host }}">
|
||||
{{- with .Site.Author.twitter }}
|
||||
<meta name="twitter:site" content="{{ printf "%s%s" "@" . }}">
|
||||
<meta name="twitter:creator" content="{{ printf "%s%s" "@" . }}">
|
||||
{{- end }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Author.twitterid }}<meta name="twitter:creator_id" content="{{ . }}">{{ end }}
|
||||
<meta name="twitter:dnt" content="on">
|
||||
|
Reference in New Issue
Block a user