diff options
author | Sean Lane <5761232+seanlane@users.noreply.github.com> | 2021-01-03 19:02:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 19:02:15 +0300 |
commit | 88c50c14451bb12a4f640a2144af3c4100605f93 (patch) | |
tree | f3b6bd9d30b03089f5ffefe46eb0af499a0e9490 | |
parent | efa38e90b2cb664fbf497a82049b39724e2821c1 (diff) | |
parent | 727c24f71fafdec37a6a9463e270acc25fd9a5f2 (diff) |
Merge pull request #13 from Tiliavir/patch-2
Show recipe source at end of recipe
-rw-r--r-- | layouts/recipes/single.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/layouts/recipes/single.html b/layouts/recipes/single.html index 1f5ba5b..3e7a498 100644 --- a/layouts/recipes/single.html +++ b/layouts/recipes/single.html @@ -142,7 +142,33 @@ {{ with .Params.Category }}{{ partial "taxonomy/category" . }}{{ end }} {{ with .Params.Cuisine }}{{ partial "taxonomy/cuisine" . }}{{ end }} {{ with .Params.Tags }}{{ partial "taxonomy/tags" . }}{{ end }} + + <div class="recipe-source"> + {{ if (or .Params.SourceName .Params.AuthorName) }} + inspired + {{ end }} + + {{ with .Params.SourceName }} + {{$name := .}} + by + {{with $.Params.SourceURL }} + <a href="{{.}}">{{$name}}</a> + {{else}} + {{$name}} + {{end}} + {{ end }} + {{with .Params.AuthorName}} + {{$name := .}} + from + {{with $.Params.AuthorURL }} + <a href="{{.}}">{{$name}}</a> + {{else}} + {{$name}} + {{end}} + {{end}} + </div> + </article> </div> {{ end }} |