Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/humrochagf/colordrop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHumberto Rocha <humrochagf@gmail.com>2019-08-02 17:48:42 +0300
committerHumberto Rocha <humrochagf@gmail.com>2019-08-02 17:48:42 +0300
commit39a84bde688d44714a66266ebb431ce248553397 (patch)
treec532bedcd519ae938e75cbae63622f8fda4bac24 /layouts/partials
parentbdecc2bfb6c5ff4e44e83e4fe3e49174921ccbe5 (diff)
Simplify theme structure
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/blog-jsonld.html2
-rw-r--r--layouts/partials/blog-post-jsonld.html8
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/meta.html53
-rw-r--r--layouts/partials/person-jsonld.html14
5 files changed, 20 insertions, 59 deletions
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 @@
<div class="header-group">
<div class="header-logo-container">
<a class="header-logo-link" href="{{ "/" | absLangURL }}">
- <img class="header-logo-circle" src="{{ .Site.Params.siteLogo100 | absURL }}" alt="Header Logo">
+ <img class="header-logo-circle" src="{{ .Site.Params.siteLogo | absURL }}" alt="Header Logo">
</a>
</div>
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 @@
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="ie=edge" />
-{{ if .Site.Params.gTagId }}
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.gTagId }}"></script>
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
-
- gtag('config', '{{ .Site.Params.gTagId }}');
- </script>
-{{ end }}
+{{ template "_internal/google_analytics_async.html" . }}
<!-- Favicons -->
<link rel="icon" type="image/png" href="{{ "/img/favicon-32x32.png" | absURL }}" sizes="32x32" />
@@ -35,40 +25,15 @@
<!-- General -->
<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" />
+<meta name="author" content="{{ .Site.Author.name }}" />
+<meta name="theme-color" content="{{ .Site.Params.themeColor }}" />
-<!-- Google+ -->
-<meta itemprop="name" content="{{ .Title | humanize | title }}" />
-<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="{{ .Site.Params.siteLogo | absURL }}" />
-{{ end }}
+<!-- Schema -->
+{{ template "_internal/schema.html" . }}
-<!-- Facebook -->
-<meta property="og:site_name" content="{{ .Site.Title }}" />
-<meta property="og:title" content="{{ .Title | humanize | title }}" />
-<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="{{ .Site.Params.siteLogo | absURL }}" />
-{{ end }}
+<!-- Open Graph -->
+{{ template "_internal/opengraph.html" . }}
<!-- Twitter -->
-<meta name="twitter:url" content="{{ .Permalink }}" />
-<meta name="twitter:site" content="@{{ .Site.Params.twitter }}" />
-<meta name="twitter:creator" content="@{{ .Site.Params.author.twitter }}" />
-<meta name="twitter:title" content="{{ .Title | humanize | title }}" />
-<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="{{ .Site.Params.siteLogo | absURL }}" />
-{{ end }}
+{{ template "_internal/twitter_cards.html" . }}
+<meta name="twitter:creator" content="@{{ .Site.Author.twitter }}" />
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 }}/"
]
}