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

github.com/seanlane/gochowdown.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Lane <git@sean.lane.sh>2019-01-23 00:17:05 +0300
committerSean Lane <git@sean.lane.sh>2019-01-23 00:17:05 +0300
commit586eed013d405714384c6e1a8b281393d5ff63cc (patch)
treeabf646c6f46b9c5d6114874513d40019c5818cde
parent99cbbfc5b9a812243b522ddc11d0eb75501e6d20 (diff)
Fix components, fix images to work on themes.gohugo.io
-rw-r--r--layouts/partials/home.html4
-rw-r--r--layouts/recipes/single.html10
2 files changed, 7 insertions, 7 deletions
diff --git a/layouts/partials/home.html b/layouts/partials/home.html
index d535387..ef2c10e 100644
--- a/layouts/partials/home.html
+++ b/layouts/partials/home.html
@@ -3,10 +3,10 @@
<div class="clearfix">
{{ range sort (where .Pages "Section" "recipes") "Title" }}
<div class="sm-col sm-col-6 md-col-6 lg-col-4 xs-px1 xs-mb2">
- <a class="block relative bg-blue" href="{{ .RelPermalink}}">
+ <a class="block relative bg-blue" href="{{ .RelPermalink }}">
{{ with .Resources.ByType "image" }}
{{ range first 1 . }}
- <div class="image ratio bg-cover" style="background-image:url({{ .RelPermalink | absURL }});"></div>
+ <div class="image ratio bg-cover" style="background-image:url({{$.Site.BaseURL}}{{ .RelPermalink }});"></div>
{{ end }}
{{ else }}
<div class="image ratio bg-cover"></div>
diff --git a/layouts/recipes/single.html b/layouts/recipes/single.html
index 19a86df..94aaf3d 100644
--- a/layouts/recipes/single.html
+++ b/layouts/recipes/single.html
@@ -8,7 +8,7 @@
{{ with .Resources.ByType "image" }}
{{ range . }}
<div class="xs-p2">
- <img itemprop="image" src="{{ .RelPermalink | absURL }}" />
+ <img itemprop="image" src="{{$.Site.BaseURL}}{{ .RelPermalink }}" />
</div>
{{ end }}
{{ end }}
@@ -77,8 +77,8 @@
{{ range where $.Site.Pages "Title" $compTitle }}
<h4 class="blue center">{{ .Title }}</h4>
{{ range (.Resources.ByType "image") }}
- <div class="image ratio bg-cover" style="background-image:url({{ .RelPermalink | absURL }});">
- <img class="hide" itemprop="photo" src="{{ .RelPermalink | absURL }}" />
+ <div class="image ratio bg-cover" style="background-image:url({{$.Site.BaseURL}}{{ .RelPermalink }});">
+ <img class="hide" itemprop="photo" src="{{$.Site.BaseURL}}{{ .RelPermalink }}" />
</div>
{{ end }}
{{ if .Params.Imagecredit }}
@@ -94,7 +94,7 @@
<ul class="ingredients" itemprop="ingredients">
{{ range .Params.Ingredients }}
<li itemprop="ingredient">
- {{ with ( . | markdownify) }}{{ partial "recipe_item.html" }}{{ end }}
+ {{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}
</li>
{{ end }}
</ul>
@@ -103,7 +103,7 @@
<ul itemprop="instructions">
{{ range .Params.Directions }}
<li>
- {{ with ( . | markdownify) }}{{ partial "recipe_item.html" }}{{ end }}
+ {{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}
</li>
{{ end }}
</ul>