summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Hallsby <karl@hallsby.com>2021-06-17 01:07:53 -0500
committerKarl Hallsby <karl@hallsby.com>2021-06-17 01:28:37 -0500
commit6419a9ea158fc90a1af81e209bd30592df1a6bf3 (patch)
tree1b924f16034bfceb26ba682c0d747ec35ffdb09a
parentcac4b30767ce135ba15bb22f269df73c4a20cb57 (diff)
Add RSS support with RSS logo in footer
I was already using the jekyll-feed gem to generate an RSS XML file, but this configuration puts an explicit button on the page that can be easily accessed and added by people. This icon shows on the footer of every page, just like the Email, LinkedIn, and GitHub icon/logo links do.
-rw-r--r--_config.yml1
-rw-r--r--_includes/author-links.html9
-rw-r--r--_includes/svg/icon/social/rss.svg16
-rw-r--r--_includes/svg/icon/social/rss.svg.back16
4 files changed, 41 insertions, 1 deletions
diff --git a/_config.yml b/_config.yml
index 0babc35..58c9466 100644
--- a/_config.yml
+++ b/_config.yml
@@ -40,6 +40,7 @@ author:
paths:
root: "/"
home: "/"
+ rss: "/feed.xml"
# Build settings
markdown: kramdown
diff --git a/_includes/author-links.html b/_includes/author-links.html
index 5ddc78a..31cfe2a 100644
--- a/_includes/author-links.html
+++ b/_includes/author-links.html
@@ -108,6 +108,14 @@
</li>
{%- endif -%}
+ {%- if site.paths.rss -%}
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'RSS' }}">
+ <a class="button button--circle rss-button" itemprop="sameAs" href="{{ url }} {{ site.paths.rss }}" target="_blank">
+ <div class="icon">{%- include svg/icon/social/rss.svg -%}</div>
+ </a>
+ </li>
+ {%- endif -%}
+
{%- if _author.npm -%}
<li title="{{ _locale_string_follow | replace: '[NAME]', 'npm' }}">
<a class="button button--circle npm-button" itemprop="sameAs" href="https://www.npmjs.com/~{{ _author.npm }}" target="_blank">
@@ -115,6 +123,5 @@
</a>
</li>
{%- endif -%}
-
</ul>
</div>
diff --git a/_includes/svg/icon/social/rss.svg b/_includes/svg/icon/social/rss.svg
new file mode 100644
index 0000000..e48c54f
--- /dev/null
+++ b/_includes/svg/icon/social/rss.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" id="RSSicon" viewBox="0 0 8 8" width="256" height="256">
+
+ <title>RSS feed icon</title>
+
+ <style type="text/css">
+ .button {stroke: none; fill: orange;}
+ .symbol {stroke: none; fill: white;}
+ </style>
+
+ <rect class="button" width="8" height="8" rx="1.5"/>
+ <circle class="symbol" cx="2" cy="6" r="1"/>
+ <path class="symbol" d="m 1,4 a 3,3 0 0 1 3,3 h 1 a 4,4 0 0 0 -4,-4 z"/>
+ <path class="symbol" d="m 1,2 a 5,5 0 0 1 5,5 h 1 a 6,6 0 0 0 -6,-6 z"/>
+
+</svg> \ No newline at end of file
diff --git a/_includes/svg/icon/social/rss.svg.back b/_includes/svg/icon/social/rss.svg.back
new file mode 100644
index 0000000..e48c54f
--- /dev/null
+++ b/_includes/svg/icon/social/rss.svg.back
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" id="RSSicon" viewBox="0 0 8 8" width="256" height="256">
+
+ <title>RSS feed icon</title>
+
+ <style type="text/css">
+ .button {stroke: none; fill: orange;}
+ .symbol {stroke: none; fill: white;}
+ </style>
+
+ <rect class="button" width="8" height="8" rx="1.5"/>
+ <circle class="symbol" cx="2" cy="6" r="1"/>
+ <path class="symbol" d="m 1,4 a 3,3 0 0 1 3,3 h 1 a 4,4 0 0 0 -4,-4 z"/>
+ <path class="symbol" d="m 1,2 a 5,5 0 0 1 5,5 h 1 a 6,6 0 0 0 -6,-6 z"/>
+
+</svg> \ No newline at end of file