From 39a84bde688d44714a66266ebb431ce248553397 Mon Sep 17 00:00:00 2001 From: Humberto Rocha Date: Fri, 2 Aug 2019 11:48:42 -0300 Subject: Simplify theme structure --- layouts/partials/blog-jsonld.html | 2 +- layouts/partials/blog-post-jsonld.html | 8 ++--- layouts/partials/header.html | 2 +- layouts/partials/meta.html | 53 ++++++---------------------------- layouts/partials/person-jsonld.html | 14 ++++----- 5 files changed, 20 insertions(+), 59 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/blog-jsonld.html b/layouts/partials/blog-jsonld.html index 7f5695f..85d6898 100644 --- a/layouts/partials/blog-jsonld.html +++ b/layouts/partials/blog-jsonld.html @@ -6,7 +6,7 @@ "description": "{{ .Site.Params.description }}", "author": { "@type": "Person", - "name": "{{ .Site.Params.author.name }}", + "name": "{{ .Site.Author.name }}", {{ with .Site.GetPage "/about" }} "url": "{{ .Permalink }}" {{ end }} diff --git a/layouts/partials/blog-post-jsonld.html b/layouts/partials/blog-post-jsonld.html index 30a79bd..89f1222 100644 --- a/layouts/partials/blog-post-jsonld.html +++ b/layouts/partials/blog-post-jsonld.html @@ -8,14 +8,10 @@ {{ if .Params.Tags }} "keywords": "{{ delimit .Params.Tags "," }}", {{ end }} - {{ if .Params.shareImage }} - "image": "{{ .Params.shareImage | absURL }}", - {{ else }} - "image": "{{ .Site.Params.siteLogo | absURL }}", - {{ end }} + "image": "{{ index .Params.images 0 | absURL }}", "author": { "@type": "Person", - "name": "{{ .Site.Params.author.name }}", + "name": "{{ .Site.Author.name }}", {{ with .Site.GetPage "/about" }} "url": "{{ .Permalink }}" {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7665f3d..5add599 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -3,7 +3,7 @@
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index a7c4fbb..a61b5ce 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -3,17 +3,7 @@ -{{ if .Site.Params.gTagId }} - - - -{{ end }} +{{ template "_internal/google_analytics_async.html" . }} @@ -35,40 +25,15 @@ - - + + - - - -{{ if .Params.shareImage }} - -{{ else }} - -{{ end }} + +{{ template "_internal/schema.html" . }} - - - - - - -{{ if .Params.shareImage }} - -{{ else }} - -{{ end }} + +{{ template "_internal/opengraph.html" . }} - - - - - -{{ if .Params.shareImage }} - - -{{ else }} - - -{{ end }} +{{ template "_internal/twitter_cards.html" . }} + diff --git a/layouts/partials/person-jsonld.html b/layouts/partials/person-jsonld.html index 157255b..1be5b92 100644 --- a/layouts/partials/person-jsonld.html +++ b/layouts/partials/person-jsonld.html @@ -1,16 +1,16 @@ { "@context": "http://schema.org/", "@type": "Person", - "name": "{{ .Site.Params.author.name }}", + "name": "{{ .Site.Author.name }}", {{ with .Site.GetPage "/about" }} "url": "{{ .Permalink }}", {{ end }} - "jobTitle": "{{ .Site.Params.author.jobTitle }}", - "gender": "{{ .Site.Params.author.gender }}", - "image": "{{ .Site.Params.author.image | absURL }}", + "jobTitle": "{{ .Site.Author.job }}", + "gender": "{{ .Site.Author.gender }}", + "image": "{{ .Site.Author.image | absURL }}", "sameAs": [ - "https://github.com/{{ .Site.Params.author.github }}/", - "https://twitter.com/{{ .Site.Params.author.twitter }}/", - "https://www.linkedin.com/in/{{ .Site.Params.author.linkedin }}/" + "https://github.com/{{ .Site.Author.github }}/", + "https://twitter.com/{{ .Site.Author.twitter }}/", + "https://www.linkedin.com/in/{{ .Site.Author.linkedin }}/" ] } -- cgit v1.2.3