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

github.com/josephhutch/aether.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Hutchinson <hutch7995@gmail.com>2021-02-04 05:10:11 +0300
committerJoe Hutchinson <hutch7995@gmail.com>2021-02-04 05:10:11 +0300
commitbaddc0cc0e9a2d7c749cf4ceacb23ee8ff956ae9 (patch)
treefa0935c350a1ad79b1eb5d7a8fb3177f08d31ecd
parent83846edbadad1c8bb4d10e2d5c806192c444592a (diff)
Add ability to attribute photos in posts
-rw-r--r--archetypes/posts.md3
-rw-r--r--layouts/_default/single.html7
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&nbsp;
+ {{- with .link }}<a href="{{ . }}" target="_blank" rel="noreferrer noopener">{{ end -}}
+ {{- .name -}}
+ {{- with .link }}</a>{{ end -}}
+ </small>
+ {{- end }}
{{- end }}
{{ if .Params.toc -}}
<h2>Contents</h2>