add recipe support
parent
3de41cf56e
commit
c0a92aac5c
|
@ -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
|
||||
---
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{.Title}}</h1>
|
||||
{{ range .Recipes }}
|
||||
<section class="recipe">
|
||||
<h2>{{.Name}}</h2>
|
||||
<p><b>Ingredients:</b></p>
|
||||
<ul>{{ range .Ingredients }}
|
||||
<li>{{.}}</li>{{ end }}
|
||||
</ul>
|
||||
<p><b>Directions:</b></p>
|
||||
<ol>{{ range .Directions }}
|
||||
<li>{{.}}</li>{{ end }}
|
||||
</ol>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Reference in New Issue