Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/seanlane/gochowdown.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lindenmann <Tiliavir@users.noreply.github.com>2021-01-03 12:10:09 +0300
committerGitHub <noreply@github.com>2021-01-03 12:10:09 +0300
commit727c24f71fafdec37a6a9463e270acc25fd9a5f2 (patch)
treec2a0acb59e5ea4786ca166bc6b058812cdf3cc29
parent54b825ad0fd57160ac62fb70b77cb6e8959ebcca (diff)
Show recipe source at end of recipe
-rw-r--r--layouts/recipes/single.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/layouts/recipes/single.html b/layouts/recipes/single.html
index 5b0778f..17e34f7 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 }}