diff options
-rw-r--r-- | layouts/partials/post-list.html | 4 | ||||
-rw-r--r-- | layouts/partials/tags.html | 3 | ||||
-rw-r--r-- | layouts/post/single.html | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/layouts/partials/post-list.html b/layouts/partials/post-list.html index 9a8b0a3..77907b2 100644 --- a/layouts/partials/post-list.html +++ b/layouts/partials/post-list.html @@ -5,9 +5,7 @@ {{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }} <br> <small class="text-secondary">{{ .PublishDate.Format $customDateFormat }}</small> - {{ range .Params.tags }} - <small><code><a href="{{ "/tags/" | absURL }}{{ . | urlize }}">{{ . }}</a></code></small> - {{ end }} + {{ partial "tags" . }} {{ if eq .Site.Params.showPostSummary true }} <br> {{ .Summary }} diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html new file mode 100644 index 0000000..8db7b00 --- /dev/null +++ b/layouts/partials/tags.html @@ -0,0 +1,3 @@ +{{ range .Params.tags }} +<small><code><a href="{{ "/tags/" | absURL }}{{ . | urlize }}">{{ . }}</a></code></small> +{{ end }}
\ No newline at end of file diff --git a/layouts/post/single.html b/layouts/post/single.html index 933925f..9e34d6c 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -7,9 +7,7 @@ {{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }} {{ .PublishDate.Format $customDateFormat }}{{ if gt .Lastmod .PublishDate }}, updated {{ .Lastmod.Format $customDateFormat }}{{ end }} </small> - {{ range .Params.tags }} - <small><code><a href="{{ "/tags/" | absURL }}{{ . | urlize }}">{{ . }}</a></code></small> - {{ end }} + {{ partial "tags" . }} </p> {{ .Content }} |