瀏覽代碼

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 6 年之前
父節點
當前提交
969c98ca61
共有 4 個檔案被更改,包括 9 行新增0 行删除
  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 查看文件

@@ -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 查看文件

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

+ 2
- 0
archetypes/videos.md 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存