Prechádzať zdrojové kódy

Add alternative ingredient option to shortcode

The shortcode now has an optional `alternative` option that can be used
to add an alternative for the ingredient.
Bee Hudson 6 mesiacov pred
rodič
commit
786aedf96a
1 zmenil súbory, kde vykonal 8 pridanie a 1 odobranie
  1. 8 1
      layouts/shortcodes/recipeIngredient.html

+ 8 - 1
layouts/shortcodes/recipeIngredient.html

@@ -1 +1,8 @@
-<li class="p-ingredient">{{ .Get "text" -}}</li>
+<li class="p-ingredient">
+    {{ .Get "text" -}}
+    {{- with .Get "alternative" -}}
+    <ul>
+        <li class="p-ingredient">{{ . | markdownify }}</li>
+    </ul>
+    {{- end -}}
+</li>