aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2018-02-08 17:17:17 +0100
committerFélix Sipma <felix.sipma@no-log.org>2018-02-08 17:17:17 +0100
commit5b8b271d02658e4c5775d1bdc5b611c112c36e9d (patch)
tree3fc8f256486a7a6d5a25410ff86bb5b033ef55ce
parent777b6b926fae6475ff76694d8ceacaa42949763f (diff)
replace image shortcode by img
-rw-r--r--content/historique.md4
-rw-r--r--layouts/shortcodes/image.html1
-rw-r--r--layouts/shortcodes/img.html3
3 files changed, 4 insertions, 4 deletions
diff --git a/content/historique.md b/content/historique.md
index b8dfe6c..8aee6f3 100644
--- a/content/historique.md
+++ b/content/historique.md
@@ -21,6 +21,4 @@ C'est avec fierté et plaisir que nous vous accueillons désormais au
fournil pour échanger sur nos métiers , nos produits, et leurs origines
on ne peut plus locales.
-<div class="text-center">
- <img class="fournil-content-img" src="{{< image >}}camion_patate.jpg" alt="Camion à patates Sipma">
-</div>
+{{< img src="img/camion_patate.jpg" class="fournil-content-img" alt="Camion à patates Sipma">}}
diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html
deleted file mode 100644
index 83689de..0000000
--- a/layouts/shortcodes/image.html
+++ /dev/null
@@ -1 +0,0 @@
-{{- "img/" | relURL -}}
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html
new file mode 100644
index 0000000..6dd4d46
--- /dev/null
+++ b/layouts/shortcodes/img.html
@@ -0,0 +1,3 @@
+<div class="text-center">
+ <img src="{{ .Get "src" | relURL }}" class="{{ if (.Get "class") }}{{ with .Get "class"}}{{.}}{{ end }}{{ else }}fournil-content-img{{ end }}"{{ if (.Get "alt") }} alt="{{ with .Get "alt"}}{{.}}{{ end }}"{{ end }} />
+</div>