Skip to content

Commit

Permalink
Merge pull request #69 from zbicin/master
Browse files Browse the repository at this point in the history
Add ability to customize atom:icon
  • Loading branch information
yoshinorin authored Dec 26, 2018
2 parents 775c6aa + 2d76b69 commit d02618d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ feed:
content_limit: 140
content_limit_delim: ' '
order_by: -date
icon: icon.png
```
- **type** - Feed type. (atom/rss2)
Expand All @@ -41,3 +42,4 @@ feed:
- **content_limit** - (optional) Default length of post content used in summary. Only used, if **content** setting is false and no custom post description present.
- **content_limit_delim** - (optional) If **content_limit** is used to shorten post contents, only cut at the last occurrence of this delimiter before reaching the character limit. Not used by default.
- **order_by** - Feed order-by. (Default: -date)
- **icon** - (optional) Custom feed icon. Defaults to a gravatar of email specified in the main config.
3 changes: 2 additions & 1 deletion lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ module.exports = function(locals) {
if (url[url.length - 1] !== '/') url += '/';

var icon;
if (config.email) icon = gravatar(config.email);
if (feedConfig.icon) icon = url + feedConfig.icon;
else if (config.email) icon = gravatar(config.email);

var xml = template.render({
config: config,
Expand Down

0 comments on commit d02618d

Please sign in to comment.