diff options
author | Joe Hutchinson <hutch7995@gmail.com> | 2021-02-04 05:10:11 +0300 |
---|---|---|
committer | Joe Hutchinson <hutch7995@gmail.com> | 2021-02-04 05:10:11 +0300 |
commit | baddc0cc0e9a2d7c749cf4ceacb23ee8ff956ae9 (patch) | |
tree | fa0935c350a1ad79b1eb5d7a8fb3177f08d31ecd | |
parent | 83846edbadad1c8bb4d10e2d5c806192c444592a (diff) |
Add ability to attribute photos in posts
-rw-r--r-- | archetypes/posts.md | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/archetypes/posts.md b/archetypes/posts.md index 3e44e17..42f56d7 100644 --- a/archetypes/posts.md +++ b/archetypes/posts.md @@ -13,4 +13,7 @@ resources: src: "" params: description: "" + attribution: + name: "" + link: "" --- diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0c43b52..014eac2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -18,6 +18,13 @@ <source srcset="{{ $featured.Permalink }}"> <img src="{{ $featured.Permalink }}" {{ with .Params.description -}} alt="{{ . }}" {{- end }}> </picture> + {{ with .Params.attribution -}} + <small>Picture by + {{- with .link }}<a href="{{ . }}" target="_blank" rel="noreferrer noopener">{{ end -}} + {{- .name -}} + {{- with .link }}</a>{{ end -}} + </small> + {{- end }} {{- end }} {{ if .Params.toc -}} <h2>Contents</h2> |