Browse Source

Add /via links for attribution

You can add a via: param to the front matter of any content type but I've only included it in the archtectypes for the types that are likely to need it. Close #18
master
Adrian Short 7 years ago
parent
commit
969c98ca61
4 changed files with 9 additions and 0 deletions
  1. +2
    -0
      archetypes/images.md
  2. +2
    -0
      archetypes/quotes.md
  3. +2
    -0
      archetypes/videos.md
  4. +3
    -0
      layouts/partials/tags.html

+ 2
- 0
archetypes/images.md View File

@@ -6,5 +6,7 @@ type: image
# image is relative to /static/images/
image: {{ .TranslationBaseName }}.jpg
show_title: false
# via: add a URL for attribution if it's not your image
via:
tags:
---

+ 2
- 0
archetypes/quotes.md View File

@@ -6,5 +6,7 @@ author:
work:
year:
type: quote
# via: add a URL for attribution
via:
tags:
---

+ 2
- 0
archetypes/videos.md View File

@@ -4,5 +4,7 @@ date: {{ .Date }}
draft: false
embed_url:
type: video
# via: add a URL for attribution
via:
tags:
---

+ 3
- 0
layouts/partials/tags.html View File

@@ -2,5 +2,8 @@
{{ range .Params.tags }}
<li><a href="{{ relURL "/tags/" }}{{ . | urlize }}/">{{ . }}</a></li>
{{ end }}
{{- with .Params.via -}}
<li><a href="{{ . }}">/via</a></li>
{{- end -}}
<li><a href="{{ .Permalink }}" title="Permalink">#</a></li>
</ul>

Loading…
Cancel
Save