From 9af039619e613da38bb302bb6fe52304ef6dd200 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Wed, 6 Oct 2021 09:52:06 -0500 Subject: [PATCH] Add RSS link --- assets/css/bobastyle.css | 9 +++++++++ layouts/_default/list.html | 20 ++++++++++++++++++-- layouts/_default/single.html | 22 ++++++++++++---------- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index 64373a3..fabb1a8 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -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) */ diff --git a/layouts/_default/list.html b/layouts/_default/list.html index f4ae9de..a28c599 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,24 @@ {{ define "main" }} {{ if or (eq .Kind "term") (eq .Kind "taxonomy") }} -

Filtering for "{{ .Title }}"

+

+ Filtering for "{{ .Title }}" + {{ if eq .Kind "term" }} + + {{ with .OutputFormats.Get "rss" }} + {{ partial "icon.html" "rss" }} + {{ end }} + + {{ end }} +

{{ else }} -

{{ .Title | markdownify }}

+

+ {{ .Title | markdownify }} + + {{ with .OutputFormats.Get "rss" }} + {{ partial "icon.html" "rss" }} + {{ end }} + +

{{ end }} {{ if eq .Kind "taxonomy" }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5efec93..6bb1f47 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,18 +7,20 @@
{{ if .Date }} - {{ partial "icon.html" "calendar" }} - + + {{ partial "icon.html" "calendar" }} + - {{ if ne .Lastmod .Date }} - - {{ end }} + {{ if ne .Lastmod .Date }} + + {{ end }} - {{ end }} + {{ end }} + {{ range (.GetTerms "tags") }}