Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon and logo support #400

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
parkr marked this conversation as resolved.
Show resolved Hide resolved
icon: /images/icon.png
logo: /images/logo.png
```


### Already have a feed path?

Expand Down
16 changes: 16 additions & 0 deletions lib/jekyll-feed/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@
<subtitle>{{ site.description | xml_escape }}</subtitle>
{% endif %}

{% if site.blog.icon %}
{% assign blog_icon = site.blog.icon %}
{% unless blog_icon contains "://" %}
{% assign blog_icon = blog_icon | absolute_url %}
{% endunless %}
<icon>{{ blog_icon | xml_escape }}</icon>
{% endif %}

{% if site.blog.logo %}
{% assign blog_logo = site.blog.logo %}
{% unless blog_logo contains "://" %}
{% assign blog_logo = blog_logo | absolute_url %}
{% endunless %}
<logo>{{ blog_logo | xml_escape }}</logo>
{% endif %}

{% if site.author %}
<author>
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
Expand Down