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

github.com/zwbetz-gh/minimal-bootstrap-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwbetz <zwbetz@gmail.com>2018-10-13 08:27:46 +0300
committerzwbetz <zwbetz@gmail.com>2018-10-13 08:27:46 +0300
commit2af55e1ce2aacb81dc2743730974e0828211082d (patch)
tree680721b46419d31b20dfb3f5ed1ed89d2f455852 /layouts
parentafd5c2a492b07337384f6db237f749511dbc3fba (diff)
Only show author name if argument given to blockquote shortcode
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/blockquote.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/shortcodes/blockquote.html b/layouts/shortcodes/blockquote.html
index 1668699..6d62a0e 100644
--- a/layouts/shortcodes/blockquote.html
+++ b/layouts/shortcodes/blockquote.html
@@ -1,4 +1,8 @@
+{{- $author := .Get 0 -}}
+
<blockquote class="blockquote">
<p class="mb-0">{{ .Inner }}</p>
- <footer class="blockquote-footer">{{ .Get 0 }}</footer>
+ {{ if ne "" $author }}
+ <footer class="blockquote-footer">{{ $author }}</footer>
+ {{ end }}
</blockquote> \ No newline at end of file