diff --git a/.eleventy.js b/.eleventy.js index bfff20a..9ac9fd8 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -61,8 +61,9 @@ module.exports = config => { return value.toLowerCase(); }); - config.addFilter('asArray', function(value) { - return value ? [...value] : [] + // This workaround is needed so we can transform it back into an array with Alpine (we can't split on "," as it can be included within the items) + config.addFilter('arrayToString', function(value) { + return value.join('£'); }); /* Shortcodes */ diff --git a/src/_includes/layouts/recipe.njk b/src/_includes/layouts/recipe.njk index 42c6818..1230351 100644 --- a/src/_includes/layouts/recipe.njk +++ b/src/_includes/layouts/recipe.njk @@ -11,7 +11,7 @@ {{ tag }} {% endfor %} -
+
{% if time or servings %}
{% if time %} diff --git a/src/recipes/courgette-lemon-risotto.md b/src/recipes/courgette-lemon-risotto.md index d68fad8..d0f6cdf 100644 --- a/src/recipes/courgette-lemon-risotto.md +++ b/src/recipes/courgette-lemon-risotto.md @@ -11,7 +11,7 @@ sourceLabel: BBC good food sourceURL: https://www.bbcgoodfood.com/recipes/courgette-lemon-risotto/ ingredients: - 50g butter - - 1 onion finely chopped + - 1 onion, finely chopped - 1 large garlic clove crushed - 180g risotto rice - 1 vegetable stock cube