From 89e5445a467d42b84acc6377d3060f1a129d4a26 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 30 May 2017 00:46:22 +0100 Subject: [PATCH] Fix double slash in header image paths (#177) --- layouts/_default/list.html | 7 +------ layouts/_default/single.html | 7 +------ layouts/partials/header_image.html | 6 ++++++ layouts/project/single.html | 7 +------ layouts/publication/single.html | 7 +------ layouts/section/post.html | 7 +------ layouts/section/publication.html | 7 +------ layouts/section/talk.html | 7 +------ layouts/talk/single.html | 7 +------ 9 files changed, 14 insertions(+), 48 deletions(-) create mode 100644 layouts/partials/header_image.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9aa3bd06..477932ad 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,12 +1,7 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -{{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
-{{end}} +{{ partial "header_image.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 386d5082..bc14f19a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,12 +3,7 @@
- {{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
- {{end}} + {{ partial "header_image.html" . }}

{{ .Title }}

diff --git a/layouts/partials/header_image.html b/layouts/partials/header_image.html new file mode 100644 index 00000000..3dae9f35 --- /dev/null +++ b/layouts/partials/header_image.html @@ -0,0 +1,6 @@ +{{ if .Params.header.image }} +
+ + {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} +
+{{end}} diff --git a/layouts/project/single.html b/layouts/project/single.html index f524ca73..d576aa22 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -3,12 +3,7 @@
- {{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
- {{end}} + {{ partial "header_image.html" . }}
diff --git a/layouts/publication/single.html b/layouts/publication/single.html index 0c5fdcd7..ec6336aa 100644 --- a/layouts/publication/single.html +++ b/layouts/publication/single.html @@ -2,12 +2,7 @@ {{ partial "navbar.html" . }}
- {{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
- {{end}} + {{ partial "header_image.html" . }}

{{ .Title }}

diff --git a/layouts/section/post.html b/layouts/section/post.html index d8656c32..4f1543c1 100644 --- a/layouts/section/post.html +++ b/layouts/section/post.html @@ -1,12 +1,7 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -{{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
-{{end}} +{{ partial "header_image.html" . }}
diff --git a/layouts/section/publication.html b/layouts/section/publication.html index 97b6724c..55a239fe 100644 --- a/layouts/section/publication.html +++ b/layouts/section/publication.html @@ -1,12 +1,7 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -{{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
-{{end}} +{{ partial "header_image.html" . }}
diff --git a/layouts/section/talk.html b/layouts/section/talk.html index 1ae8fc56..3fff7b09 100644 --- a/layouts/section/talk.html +++ b/layouts/section/talk.html @@ -1,12 +1,7 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -{{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
-{{end}} +{{ partial "header_image.html" . }}
diff --git a/layouts/talk/single.html b/layouts/talk/single.html index 4db5192f..af4a949c 100644 --- a/layouts/talk/single.html +++ b/layouts/talk/single.html @@ -2,12 +2,7 @@ {{ partial "navbar.html" . }}
- {{ if .Params.header.image }} -
- - {{ with .Params.header.caption }}{{ . | markdownify | emojify }}{{ end }} -
- {{end}} + {{ partial "header_image.html" . }}