Add ability to attribute photos in posts
This commit is contained in:
@@ -13,4 +13,7 @@ resources:
|
|||||||
src: ""
|
src: ""
|
||||||
params:
|
params:
|
||||||
description: ""
|
description: ""
|
||||||
|
attribution:
|
||||||
|
name: ""
|
||||||
|
link: ""
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -18,6 +18,13 @@
|
|||||||
<source srcset="{{ $featured.Permalink }}">
|
<source srcset="{{ $featured.Permalink }}">
|
||||||
<img src="{{ $featured.Permalink }}" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
|
<img src="{{ $featured.Permalink }}" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
|
||||||
</picture>
|
</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 }}
|
{{- end }}
|
||||||
{{ if .Params.toc -}}
|
{{ if .Params.toc -}}
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user