From c0a92aac5ca6fce599672094e384d1632f7b89d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=ADle=20Ekaterin=20Liszka?= Date: Sat, 12 Nov 2022 13:05:22 -0800 Subject: [PATCH] add recipe support --- archetypes/recipe.md | 18 ++++++++++++++++++ themes/clean/layouts/_default/recipe.html | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 archetypes/recipe.md create mode 100644 themes/clean/layouts/_default/recipe.html diff --git a/archetypes/recipe.md b/archetypes/recipe.md new file mode 100644 index 0000000..5f2a0f9 --- /dev/null +++ b/archetypes/recipe.md @@ -0,0 +1,18 @@ +--- +draft: true +title: "{{ replace .Name "-" " " | title }}" +tags: [] +servings: 4 +# in minutes +prep_time: 15 +cook_time: 15 +cook: true +recipes: + - name: sauce + ingredients: + - 2tbsps flour + - 2tbsps butter + - name: dish + ingredients: + - 1lb sirloin +--- \ No newline at end of file diff --git a/themes/clean/layouts/_default/recipe.html b/themes/clean/layouts/_default/recipe.html new file mode 100644 index 0000000..0570aa7 --- /dev/null +++ b/themes/clean/layouts/_default/recipe.html @@ -0,0 +1,16 @@ +{{ define "main" }} +

{{.Title}}

+{{ range .Recipes }} +
+

{{.Name}}

+

Ingredients:

+ +

Directions:

+
    {{ range .Directions }} +
  1. {{.}}
  2. {{ end }} +
+
+{{ end }} +{{ end }} \ No newline at end of file