Add ability to attribute photos in posts
This commit is contained in:
@@ -13,4 +13,7 @@ resources:
|
||||
src: ""
|
||||
params:
|
||||
description: ""
|
||||
attribution:
|
||||
name: ""
|
||||
link: ""
|
||||
---
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user