Skip to content

Commit

Permalink
Add RSS link
Browse files Browse the repository at this point in the history
  • Loading branch information
BBaoVanC committed Oct 6, 2021
1 parent 919fcfe commit 9af0396
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
9 changes: 9 additions & 0 deletions assets/css/bobastyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
20 changes: 18 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -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" }}
Expand Down
22 changes: 12 additions & 10 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ <h1>{{ .Title | markdownify }}</h1>
<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") }}
Expand Down

0 comments on commit 9af0396

Please sign in to comment.