From 969c98ca61862b1ae729aa5731f80b23ce260a26 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Fri, 18 Aug 2017 08:11:58 +0100 Subject: [PATCH] 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 --- archetypes/images.md | 2 ++ archetypes/quotes.md | 2 ++ archetypes/videos.md | 2 ++ layouts/partials/tags.html | 3 +++ 4 files changed, 9 insertions(+) diff --git a/archetypes/images.md b/archetypes/images.md index 7057b76..211b33c 100644 --- a/archetypes/images.md +++ b/archetypes/images.md @@ -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: --- diff --git a/archetypes/quotes.md b/archetypes/quotes.md index 755085d..e8387a9 100644 --- a/archetypes/quotes.md +++ b/archetypes/quotes.md @@ -6,5 +6,7 @@ author: work: year: type: quote +# via: add a URL for attribution +via: tags: --- diff --git a/archetypes/videos.md b/archetypes/videos.md index 443da7b..b9e85e5 100644 --- a/archetypes/videos.md +++ b/archetypes/videos.md @@ -4,5 +4,7 @@ date: {{ .Date }} draft: false embed_url: type: video +# via: add a URL for attribution +via: tags: --- diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html index 8c53aad..3ea533b 100644 --- a/layouts/partials/tags.html +++ b/layouts/partials/tags.html @@ -2,5 +2,8 @@ {{ range .Params.tags }}
  • {{ . }}
  • {{ end }} + {{- with .Params.via -}} +
  • /via
  • + {{- end -}}
  • #