diff --git a/.gitignore b/.gitignore
index 1b0ebca8..16434d64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@ public/
builds/
resources/
+.env
+
node_modules/
package-lock.json
yarn-debug.log
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a3684f04..3cc3ca47 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,6 +1,6 @@
{{ printf "" ("humans.txt" | absURL) | safeHTML }}
-
+
{{ partial "head/head" . }}
diff --git a/layouts/_default/single.amp.html b/layouts/_default/single.amp.html
index 38643d52..32bab672 100644
--- a/layouts/_default/single.amp.html
+++ b/layouts/_default/single.amp.html
@@ -14,7 +14,7 @@
{{ if .HasShortcode "vimeo" }}{{ end }}
{{ .Title }} – {{ .Site.Title }}
{{ with .OutputFormats.Get "html" }}{{ end }}
-
+
{{ partial "head/open-graph" . }}
diff --git a/layouts/partials/head/social-images.html b/layouts/partials/functions/social-images.html
similarity index 92%
rename from layouts/partials/head/social-images.html
rename to layouts/partials/functions/social-images.html
index 37cb7ac2..46a70e4a 100644
--- a/layouts/partials/head/social-images.html
+++ b/layouts/partials/functions/social-images.html
@@ -1,6 +1,6 @@
{{/* Default image */}}
{{- $defaultImagePath := (path.Join "content" $.Site.Params.defaultimage) }}
-{{ $.Scratch.Set "defaultImage_url" (replace $defaultImagePath "content/" $.Site.BaseURL) }}
+{{ $.Scratch.Set "defaultImage_url" (replace $defaultImagePath "content/" "") }}
{{ with (imageConfig $defaultImagePath) }}
{{- $.Scratch.Set "defaultImage_width" .Width }}
{{- $.Scratch.Set "defaultImage_height" .Height }}
@@ -10,13 +10,13 @@
{{- with .Params.image }}
{{- $imagePath := (path.Join "content" $.File.Dir "images/" .) }}
- {{- $.Scratch.Set "socialImage_url" (replace $imagePath "content/" $.Site.BaseURL) }}
+ {{- $.Scratch.Set "socialImage_url" (replace $imagePath "content/" "") }}
{{- with (imageConfig $imagePath) }}
{{- $.Scratch.Set "socialImage_width" .Width }}
{{- $.Scratch.Set "socialImage_height" .Height }}
{{- end }}
{{ else }}
- {{- $.Scratch.Set "socialImage_url" (replace $defaultImagePath "content/" $.Site.BaseURL) }}
+ {{- $.Scratch.Set "socialImage_url" (replace $defaultImagePath "content/" "") }}
{{- with (imageConfig $defaultImagePath) }}
{{- $.Scratch.Set "socialImage_width" .Width }}
{{- $.Scratch.Set "socialImage_height" .Height }}
@@ -25,7 +25,7 @@
{{/* Site logo */}}
{{- $logoImagePath := (path.Join "content" "logo.png") }}
-{{ $.Scratch.Set "logoImage_url" (replace $logoImagePath "content/" $.Site.BaseURL) }}
+{{ $.Scratch.Set "logoImage_url" (replace $logoImagePath "content/" "") }}
{{ with (imageConfig $logoImagePath) }}
{{- $.Scratch.Set "logoImage_width" .Width }}
{{- $.Scratch.Set "logoImage_height" .Height }}
diff --git a/layouts/partials/head/head.html b/layouts/partials/head/head.html
index 278c23f0..bad01f61 100644
--- a/layouts/partials/head/head.html
+++ b/layouts/partials/head/head.html
@@ -1,5 +1,5 @@
{{ partial "head/meta" . -}}
-{{ partial "head/social-images" . -}}
+{{ partial "functions/social-images" . -}}
{{ partial "head/open-graph" . -}}
{{ partialCached "head/mobile" . -}}
{{ partialCached "head/preload" . -}}
diff --git a/layouts/partials/head/open-graph.html b/layouts/partials/head/open-graph.html
index a8b5d2d8..36fb6f71 100644
--- a/layouts/partials/head/open-graph.html
+++ b/layouts/partials/head/open-graph.html
@@ -5,7 +5,7 @@
-
+
diff --git a/layouts/partials/head/schema-article.html b/layouts/partials/head/schema-article.html
index 35a25f79..efd68ce7 100644
--- a/layouts/partials/head/schema-article.html
+++ b/layouts/partials/head/schema-article.html
@@ -12,7 +12,7 @@
"description": {{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }},
"wordCount": "{{ .WordCount }}",
"author": {
- "@id": {{ printf "%s%s" .Site.BaseURL "#author" }}
+ "@id": {{ path.Join $.Site.BaseURL "#author" }}
},
"publisher": {
"@type": "Organization",
@@ -20,14 +20,14 @@
"url": {{ .Site.BaseURL }},
"logo": {
"@type": "ImageObject",
- "url": {{ .Scratch.Get "logoImage_url" }},
+ "url": {{ .Scratch.Get "logoImage_url" | absURL }},
"width": "{{ .Scratch.Get "logoImage_width" }}",
"height": "{{ .Scratch.Get "logoImage_height" }}"
}
},
"image": {
"@type": "ImageObject",
- "url": {{ .Scratch.Get "socialImage_url" }},
+ "url": {{ .Scratch.Get "socialImage_url" | absURL }},
"width": "{{ .Scratch.Get "socialImage_width" }}",
"height": "{{ .Scratch.Get "socialImage_height" }}"
}
diff --git a/layouts/partials/head/schema-person.html b/layouts/partials/head/schema-person.html
index 115a9c30..8f572c9d 100644
--- a/layouts/partials/head/schema-person.html
+++ b/layouts/partials/head/schema-person.html
@@ -3,14 +3,14 @@
{
"@context": "http://schema.org",
"@type": "Person",
- "@id": {{ printf "%s%s" $.Site.BaseURL "#author" }},
+ "@id": {{ path.Join $.Site.BaseURL "#author" }},
"name": {{ $.Site.Author.name }},
"url": {{ $.Site.BaseURL }},
"description": {{ $.Site.Params.description }},
{{ with .jobtitle }}"jobTitle": {{ . }},{{ end }}
"image": {
"@type": "ImageObject",
- "url": {{ $.Scratch.Get "defaultImage_url" }},
+ "url": {{ $.Scratch.Get "defaultImage_url" | absURL }},
"width": "{{ $.Scratch.Get "defaultImage_width" }}",
"height": "{{ $.Scratch.Get "defaultImage_height" }}"
},
diff --git a/package.json b/package.json
index 3c260b98..1ff83007 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
"cross-env": "^7.0.0",
"get-folder-size": "^2.0.1",
"html-minifier": "^4.0.0",
- "hugo-extended": "git+https://github.com/jakejarvis/hugo-extended.git#master",
+ "hugo-extended": "git+https://github.com/jakejarvis/hugo-extended.git",
"imagemin-cli": "^5.1.0",
"imagemin-gifsicle": "^7.0.0",
"imagemin-jpegoptim": "^6.0.0",
diff --git a/yarn.lock b/yarn.lock
index 9d642355..77fcf599 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2310,7 +2310,7 @@ https-proxy-agent@^4.0.0:
agent-base "5"
debug "4"
-"hugo-extended@git+https://github.com/jakejarvis/hugo-extended.git#master":
+"hugo-extended@git+https://github.com/jakejarvis/hugo-extended.git":
version "0.63.2"
resolved "git+https://github.com/jakejarvis/hugo-extended.git#f6b20c2deeabdc9d45f49ee9cfa3f8d7c704737a"
dependencies: