Adds image support for both the recipe and the steps

This commit is contained in:
Miguel de la Cruz 2024-07-03 20:41:28 +02:00
parent 943e9df086
commit c251e1543d
3 changed files with 33 additions and 5 deletions

View file

@ -10,6 +10,11 @@
<body>
<h1>{{.name}}</h1>
{{$recipeImage := recipeImage .path}}
{{if ne $recipeImage ""}}
<img class="recipeimage" src="{{$recipeImage}}" />
{{end}}
{{if ne (len .recipe.Steps) 0}}
<ul>
{{range $k, $v := .recipe.Metadata}}
@ -18,6 +23,6 @@
</ul>
{{end}}
{{recipeSteps .recipe}}
{{recipeSteps .recipe .path}}
</body>
</html>