diff options
author | Humberto Rocha <humrochagf@gmail.com> | 2019-07-31 19:44:25 +0300 |
---|---|---|
committer | Humberto Rocha <humrochagf@gmail.com> | 2019-07-31 19:44:25 +0300 |
commit | d4a7d199b25eea58aa71492d2f708d36de04ae2e (patch) | |
tree | aada370b9b6fe2be5afba362d5a0b63fcd624c77 /layouts/partials | |
parent | e8de100529f412d6624431ebeda7925c4fdb0e06 (diff) |
Add person json ld and fix meta
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/meta.html | 20 | ||||
-rw-r--r-- | layouts/partials/person-jsonld.html | 14 |
2 files changed, 24 insertions, 10 deletions
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 2a2aede..04dd986 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -29,41 +29,41 @@ {{ end }} <!-- General --> -<meta name="description" content="{{ .Site.Params.description }}" /> -<meta name="author" content="{{ .Site.Params.author }}" /> +<meta name="description" content="{{ index .Params "description" | default .Site.Params.description }}" /> +<meta name="author" content="{{ .Site.Params.author.name }}" /> <meta name="theme-color" content="#ffffff" /> <!-- Google+ --> <meta itemprop="name" content="{{ .Title }}" /> -<meta itemprop="description" content="{{ .Site.Params.description }}" /> +<meta itemprop="description" content="{{ index .Params "description" | default .Site.Params.description }}" /> {{ if .Params.shareImage }} <meta itemprop="image" content="{{ .Params.shareImage | absURL }}" /> {{ else }} - <meta itemprop="image" content="{{ "/img/me-100x100.jpg" | absURL }}" /> + <meta itemprop="image" content="{{ .Site.Params.siteLogo | absURL }}" /> {{ end }} <!-- Facebook --> -<meta property="og:site_name" content="{{ .Title }}" /> +<meta property="og:site_name" content="{{ .Site.Title }}" /> <meta property="og:title" content="{{ .Title }}" /> -<meta property="og:description" content="{{ .Site.Params.description }}" /> +<meta property="og:description" content="{{ index .Params "description" | default .Site.Params.description }}" /> <meta property="og:url" content="{{ .Permalink }}" /> <meta property="og:type" content="article" /> {{ if .Params.shareImage }} <meta property="og:image" content="{{ .Params.shareImage | absURL }}" /> {{ else }} - <meta property="og:image" content="{{ "/img/me-100x100.jpg" | absURL }}" /> + <meta property="og:image" content="{{ .Site.Params.siteLogo | absURL }}" /> {{ end }} <!-- Twitter --> <meta name="twitter:url" content="{{ .Permalink }}" /> <meta name="twitter:site" content="@{{ .Site.Params.twitter }}" /> -<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}" /> +<meta name="twitter:creator" content="@{{ .Site.Params.author.twitter }}" /> <meta name="twitter:title" content="{{ .Title }}" /> -<meta name="twitter:description" content="{{ .Site.Params.description }}" /> +<meta name="twitter:description" content="{{ index .Params "description" | default .Site.Params.description }}" /> {{ if .Params.shareImage }} <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="{{ .Params.shareImage | absURL }}" /> {{ else }} <meta name="twitter:card" content="summary" /> - <meta name="twitter:image" content="{{ "/img/me-100x100.jpg" | absURL }}" /> + <meta name="twitter:image" content="{{ .Site.Params.siteLogo | absURL }}" /> {{ end }} diff --git a/layouts/partials/person-jsonld.html b/layouts/partials/person-jsonld.html new file mode 100644 index 0000000..b554f81 --- /dev/null +++ b/layouts/partials/person-jsonld.html @@ -0,0 +1,14 @@ +{ + "@context": "http://schema.org/", + "@type": "Person", + "name": "{{ .Site.Params.author.name }}", + "url": "{{ .Permalink }}", + "jobTitle": "{{ .Site.Params.author.jobTitle }}", + "gender": "{{ .Site.Params.author.gender }}", + "image": "{{ .Site.Params.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 }}/" + ] +} |