Add RSS link

This commit is contained in:
BBaoVanC 2021-10-06 09:52:06 -05:00
parent 919fcfe7cc
commit 9af039619e
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
3 changed files with 39 additions and 12 deletions

View File

@ -24,6 +24,15 @@
padding-left: 10px; padding-left: 10px;
} }
.rss-link {
padding-left: 5px;
}
.rss-link a svg {
width: 30px;
height: 30px;
}
/* Header formatting (website title and article section headers) */ /* Header formatting (website title and article section headers) */

View File

@ -1,8 +1,24 @@
{{ define "main" }} {{ define "main" }}
{{ if or (eq .Kind "term") (eq .Kind "taxonomy") }} {{ if or (eq .Kind "term") (eq .Kind "taxonomy") }}
<h1>Filtering for "{{ .Title }}"</h1> <h1>
Filtering for "{{ .Title }}"
{{ if eq .Kind "term" }}
<span class="rss-link">
{{ with .OutputFormats.Get "rss" }}
<a href="{{ .Permalink }}">{{ partial "icon.html" "rss" }}</a>
{{ end }}
</span>
{{ end }}
</h1>
{{ else }} {{ else }}
<h1>{{ .Title | markdownify }}</h1> <h1>
{{ .Title | markdownify }}
<span class="rss-link">
{{ with .OutputFormats.Get "rss" }}
<a href="{{ .Permalink }}">{{ partial "icon.html" "rss" }}</a>
{{ end }}
</span>
</h1>
{{ end }} {{ end }}
{{ if eq .Kind "taxonomy" }} {{ if eq .Kind "taxonomy" }}

View File

@ -7,6 +7,7 @@
<div class="post-metadata"> <div class="post-metadata">
{{ if .Date }} {{ if .Date }}
<span class="date">
{{ partial "icon.html" "calendar" }} {{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate> <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ .Date.Format "January 2, 2006" }} {{ .Date.Format "January 2, 2006" }}
@ -19,6 +20,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</span>
<span class="tags"> <span class="tags">
{{ range (.GetTerms "tags") }} {{ range (.GetTerms "tags") }}