diff --git a/README.md b/README.md index a0f9d1f2..e4f83f6d 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) +* `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 + feed: + icon: /images/icon.png + logo: /images/logo.png + ``` + ### Already have a feed path? diff --git a/lib/jekyll-feed/feed.xml b/lib/jekyll-feed/feed.xml index 9068836f..dfc0bfff 100644 --- a/lib/jekyll-feed/feed.xml +++ b/lib/jekyll-feed/feed.xml @@ -27,6 +27,22 @@ {{ site.description | xml_escape }} {% endif %} + {% if site.feed.icon %} + {% assign feed_icon = site.feed.icon %} + {% unless feed_icon contains "://" %} + {% assign feed_icon = feed_icon | absolute_url %} + {% endunless %} + {{ feed_icon | xml_escape }} + {% endif %} + + {% if site.feed.logo %} + {% assign feed_logo = site.feed.logo %} + {% unless feed_logo contains "://" %} + {% assign feed_logo = feed_logo | absolute_url %} + {% endunless %} + {{ feed_logo | xml_escape }} + {% endif %} + {% if site.author %} {{ site.author.name | default: site.author | xml_escape }}