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

github.com/themefisher/vex-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraterbrain <58347640+Craterbrain@users.noreply.github.com>2020-08-19 05:45:05 +0300
committerGitHub <noreply@github.com>2020-08-19 05:45:05 +0300
commitf3efaf11b4faab3370204a961fecd1ed4ded0c8c (patch)
tree2f6620fb0df5bef4703594aeb29c65a52e721e4f
parent20d5b665371d3827cbcebb807843c2fa369ca6fb (diff)
Update single.html
See https://discourse.gohugo.io/t/error-calling-delimit-cant-iterate-over-nil/23016 Having a product that doesn't include one of the param options breaks the site from building.
-rw-r--r--layouts/products/single.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/products/single.html b/layouts/products/single.html
index 8651733..5b610c6 100644
--- a/layouts/products/single.html
+++ b/layouts/products/single.html
@@ -15,8 +15,8 @@
</div>
<div class="col-lg-6 col-md-7 offset-lg-1">
<h1 class="mb-4">{{ .Title }}</h1>
- <p><strong>Colors:</strong> {{delimit .Params.colors ", "}}</p>
- <p><strong>Sizes:</strong> {{delimit .Params.sizes ", "}}</p>
+ <p><strong>Colors:</strong> {{ with .Params.colors }}{{ delimit . ", "}}{{ end }}</p>
+ <p><strong>Sizes:</strong> {{ with .Params.sizes }}{{ delimit . ", "}}{{ end }}</p>
<p class="price py-4">{{if .Params.discount_price}}{{site.Params.currency}}{{.Params.discount_price}}{{else}}{{site.Params.currency}}{{.Params.price}}{{end}}
{{if .Params.discount_price}}<s class="price">{{site.Params.currency}}{{ .Params.price }}</s>{{end}}
</p>
@@ -40,4 +40,4 @@
</div>
</section>
-{{ end }} \ No newline at end of file
+{{ end }}