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;
}
.rss-link {
padding-left: 5px;
}
.rss-link a svg {
width: 30px;
height: 30px;
}
/* Header formatting (website title and article section headers) */

View File

@ -1,8 +1,24 @@
{{ define "main" }}
{{ 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 }}
<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 }}
{{ if eq .Kind "taxonomy" }}

View File

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