Adds external URL to the recipe
This commit is contained in:
parent
7a5ab7cf09
commit
432be8dfb2
3 changed files with 13 additions and 1 deletions
|
@ -12,6 +12,10 @@
|
|||
<div id="content">
|
||||
<h1>{{.name}}</h1>
|
||||
|
||||
{{if ne .url ""}}
|
||||
<a class="recipe-url" href="{{.url}}">External URL</a>
|
||||
{{end}}
|
||||
|
||||
{{$recipeImage := recipeImage .path}}
|
||||
{{if ne $recipeImage ""}}
|
||||
<img class="recipeimage" src="{{$recipeImage}}" />
|
||||
|
@ -21,8 +25,9 @@
|
|||
<ul>
|
||||
{{$m := .recipe.Metadata}}
|
||||
{{$nameKey := .nameKey}}
|
||||
{{$urlKey := .urlKey}}
|
||||
{{range $k := sortedMetadataKeys $m}}
|
||||
{{if ne $k $nameKey}}
|
||||
{{if and (ne $k $nameKey) (ne $k $urlKey)}}
|
||||
<li><em>{{$k}}:</em> {{index $m $k}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue