From 4293dd3888f291aee295f6c13aa879487e1e0296 Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Fri, 29 Dec 2023 15:29:59 +0100 Subject: [PATCH 1/5] Add icon for Atom feed If there's a blog_icon defined in the _config.yml file, then this will insert it as an icon into the Atom feed. (Many readers don't support this, but some do.) --- lib/jekyll-feed/feed.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/jekyll-feed/feed.xml b/lib/jekyll-feed/feed.xml index 9068836f..92c346fe 100644 --- a/lib/jekyll-feed/feed.xml +++ b/lib/jekyll-feed/feed.xml @@ -27,6 +27,14 @@ {{ site.description | xml_escape }} {% endif %} + {% if site.blog_icon %} + {% assign blog_icon = site.blog_icon %} + {% unless blog_icon contains "://" %} + {% assign blog_icon = blog_icon | absolute_url %} + {% endunless %} + {{ blog_icon | xml_escape }} + {% endif %} + {% if site.author %} {{ site.author.name | default: site.author | xml_escape }} From 596d6d835d83bd4637b0bf382962f2a35b68fe16 Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Sat, 30 Dec 2023 13:21:28 +0100 Subject: [PATCH 2/5] Add blog logo --- lib/jekyll-feed/feed.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/jekyll-feed/feed.xml b/lib/jekyll-feed/feed.xml index 92c346fe..a520e3b2 100644 --- a/lib/jekyll-feed/feed.xml +++ b/lib/jekyll-feed/feed.xml @@ -27,14 +27,22 @@ {{ site.description | xml_escape }} {% endif %} - {% if site.blog_icon %} - {% assign blog_icon = site.blog_icon %} + {% if site.blog.icon %} + {% assign blog_icon = site.blog.icon %} {% unless blog_icon contains "://" %} {% assign blog_icon = blog_icon | absolute_url %} {% endunless %} {{ blog_icon | xml_escape }} {% endif %} + {% if site.blog.logo %} + {% assign blog_logo = site.blog.logo %} + {% unless blog_logo contains "://" %} + {% assign blog_logo = blog_logo | absolute_url %} + {% endunless %} + {{ blog_logo | xml_escape }} + {% endif %} + {% if site.author %} {{ site.author.name | default: site.author | xml_escape }} From 7315afdb71f498e9427e21aeb8b616b8f6d71924 Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Sat, 30 Dec 2023 13:41:31 +0100 Subject: [PATCH 3/5] Include icon and log with example --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a0f9d1f2..99d05170 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,15 @@ The plugin will automatically use any of the following configuration variables, * `description` - A longer description of what your site is about, e.g., "Where I blog about Jekyll and other awesome things" * `url` - The URL to your site, e.g., `https://example.com`. If none is provided, the plugin will try to use `site.github.url`. * `author` - Global author information (see below) +* `blog.icon` - Icon with 1:1 proportions for readers to use for the blog (not supported by all readers; often overridden by a favicon or site icon) +* `blog.logo` - Logo with 2:1 proportions for readers to use for the blog (not supported by all readers). + For example, both of the preceding can be expressed: + ```yml + blog: + icon: /images/icon.png + logo: /images/logo.png + ``` + ### Already have a feed path? From b187ce9e26740bbc536e00ad6a91156c6cdd3bf7 Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Sat, 6 Jan 2024 13:28:30 +0100 Subject: [PATCH 4/5] Switch to feed key --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 99d05170..e4f83f6d 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,11 @@ The plugin will automatically use any of the following configuration variables, * `description` - A longer description of what your site is about, e.g., "Where I blog about Jekyll and other awesome things" * `url` - The URL to your site, e.g., `https://example.com`. If none is provided, the plugin will try to use `site.github.url`. * `author` - Global author information (see below) -* `blog.icon` - Icon with 1:1 proportions for readers to use for the blog (not supported by all readers; often overridden by a favicon or site icon) -* `blog.logo` - Logo with 2:1 proportions for readers to use for the blog (not supported by all readers). +* `feed.icon` - Icon with 1:1 proportions for readers to use for the blog feed (not supported by all readers; often overridden by a favicon or site icon) +* `feed.logo` - Logo with 2:1 proportions for readers to use for the blog feed (not supported by all readers). For example, both of the preceding can be expressed: ```yml - blog: + feed: icon: /images/icon.png logo: /images/logo.png ``` From 1376b625d341ec9a81fb91af92249d92dfd995f0 Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Sat, 6 Jan 2024 13:30:49 +0100 Subject: [PATCH 5/5] Switch to feed key from blog: site.feed --- lib/jekyll-feed/feed.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/jekyll-feed/feed.xml b/lib/jekyll-feed/feed.xml index a520e3b2..dfc0bfff 100644 --- a/lib/jekyll-feed/feed.xml +++ b/lib/jekyll-feed/feed.xml @@ -27,20 +27,20 @@ {{ site.description | xml_escape }} {% endif %} - {% if site.blog.icon %} - {% assign blog_icon = site.blog.icon %} - {% unless blog_icon contains "://" %} - {% assign blog_icon = blog_icon | absolute_url %} + {% if site.feed.icon %} + {% assign feed_icon = site.feed.icon %} + {% unless feed_icon contains "://" %} + {% assign feed_icon = feed_icon | absolute_url %} {% endunless %} - {{ blog_icon | xml_escape }} + {{ feed_icon | xml_escape }} {% endif %} - {% if site.blog.logo %} - {% assign blog_logo = site.blog.logo %} - {% unless blog_logo contains "://" %} - {% assign blog_logo = blog_logo | absolute_url %} + {% if site.feed.logo %} + {% assign feed_logo = site.feed.logo %} + {% unless feed_logo contains "://" %} + {% assign feed_logo = feed_logo | absolute_url %} {% endunless %} - {{ blog_logo | xml_escape }} + {{ feed_logo | xml_escape }} {% endif %} {% if site.author %}