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

Rss feed icon won't display #1628

Closed
ncheutin opened this issue Aug 10, 2016 · 20 comments
Closed

Rss feed icon won't display #1628

ncheutin opened this issue Aug 10, 2016 · 20 comments

Comments

@ncheutin
Copy link

Hi,

I'm struggling to have my own icon displayed on my custom RSS feeds.
I set up a DataOutputAgent with the following options:

{
  "secrets": [
    "fubiz"
  ],
  "events_to_show": "100",
  "expected_receive_period_in_days": "1",
  "template": {
    "title": "Fubiz RSS",
    "description": "Fubiz RSS",
    "item": {
      "title": "{{message}}{{title}}",
      "description": "{{content}}",
      "link": "{{url}}",
      "pubDate": "{{last_updated}}",
      "guid": "{{url}}"
    },
    "icon": "https://dl.dropboxusercontent.com/u/26756317/fubiz.ico"
  },
  "ns_media": "true"
}

On my feed reader I still have the Huginn icon (quite nice I have to admit, but still not the one I expect).
I use now Inoreader (and before Feedly) to retrieve my feeds and read them via Reeder on Mac, iOS and Android.
On all of them I have the Huginn icon and not mine.

Here is the xml output used for the feed:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <atom:link href="https://link-to.my/feed.xml" rel="self" type="application/rss+xml" />
 <atom:icon>https://dl.dropboxusercontent.com/u/26756317/fubiz.ico</atom:icon>

 <title>Fubiz RSS</title>
 <description>Fubiz RSS</description>
 <link>https://link-to.my</link>
 <lastBuildDate>Wed, 10 Aug 2016 10:42:49 -0700</lastBuildDate>
 <pubDate>Wed, 10 Aug 2016 10:42:49 -0700</pubDate>
 <ttl>60</ttl>

I fail to understand what I did wrong.
Should the icon be hosted behind the same domain than the feed?
If yes, I'd like to understand how to push something to my Heroku server's public directory and have it accessible through my domain.link/fubiz.ico
This is another mystery I haven't solved yet.

Thanks for your help.

Cheers

@cantino
Copy link
Member

cantino commented Aug 15, 2016

I don't know RSS well. Is <atom:icon> the correct element for setting a feed icon? It seems right, but it sounds like the readers are fetching yourdomain.com/favicon.ico instead

@ncheutin
Copy link
Author

Thanks for your reply.
In the RFC there's nothing mentioning it should be on the same domain: https://tools.ietf.org/html/rfc4287#section-4.2.5

But you're right, it seems to call yourdomain.com/favicon.ico.
I'll try to replace that favicon.ico by another one and see how it does.

I tried to push another icon to my Heroku server in the public folder but impossible to access it.
Do you know why? Should I restart something when doing that?

The way I do it is just connecting to the heroku server using the belt toolkit with bash and I do a wget to download my .ico file.
Am I doing something wrong?

@cantino
Copy link
Member

cantino commented Aug 15, 2016

You'd have to commit the new one with git to your Huginn repository and push that.

I wonder if we need it to be <icon> instead of <atom:icon> since this is an RSS feed.

@cantino
Copy link
Member

cantino commented Aug 15, 2016

@knu added icon support in #891, he may have an idea too.

@ncheutin
Copy link
Author

I tried updating mydomain.com/favicon.ico and it worked.

I found some info here: https://snook.ca/archives/rss/add_logo_to_feed/
Tried adding the tag to but didn't work.

@cantino
Copy link
Member

cantino commented Aug 17, 2016

I wonder if the icon support is incorrect, and it should be <icon>. I'll leave this open to see if @knu has an opinion since he originally added it.

@knu
Copy link
Member

knu commented Aug 17, 2016

I believe I implemented it correctly (you can try W3C Feed Validation Service to see it's <atom:icon> not <icon>), but unfortunately, the <atom:icon> element is not supported by most popular applications. I recall I submitted my feedback to Feedly and Reeder but to no avail as of yet.

@cantino
Copy link
Member

cantino commented Aug 17, 2016

Ah, that's odd. I wonder if we should return <icon> as well since some RSS readers want that?

@ncheutin
Copy link
Author

I think the is taken into account when it is an atom feed (the format generated is RSS if I'm not mistaken).
The data are pretty much the same from what I could see but the structure is slightly different.

One day I'll try to change the format to Atom and see if it works. I haven't done any Ruby for years so it might take me a bit of time.

Otherwise, would it be doable to have a different subdomain per data_output_agent ?
So I could have a different favicon.ico for rss1.mydomain.com, rss2.mydomain.com,...

@knu
Copy link
Member

knu commented Aug 17, 2016

I think we could add a .atom format to DataOutputAgent and see if it works. I'll try when I get the time.

@ncheutin
Copy link
Author

That would be great, tell me if you want me to help you testing the PR once you get time.

@knu
Copy link
Member

knu commented Aug 17, 2016

The key will be if and how to use an existing template of RSS items for the Atom output. I don't have a plan yet.

@knu
Copy link
Member

knu commented Aug 17, 2016

I guess we should let user choose either RSS or Atom as XML output, and template be specific to the chosen format.

@ncheutin
Copy link
Author

What do you think about having two xml templates one RSS and the second Atom, the same way we already have two urls one for json the other for xml.

Potentially have:

  • output.json
  • output.rss.json
  • output.atom.json

The template could match like:

{
  "secrets": [
    "fubiz"
  ],
  "events_to_show": "100",
  "expected_receive_period_in_days": "1",
  "template": {
    "title": "Fubiz RSS", --> <title />
    "description": "Fubiz RSS", --> <subtitle /> ??
    "item": { --> <feed />
      "title": "{{message}}{{title}}",  --> <title />
      "description": "{{content}}",  --> <content type="xhtml" />
      "link": "{{url}}", --> <link />
      "pubDate": "{{last_updated}}", --> <updated />
      "guid": "{{url}}"  --> <id />
    },
    "icon": "url.to/icon.ico" --> <icon />
  },
  "ns_media": "true"
}

@cantino
Copy link
Member

cantino commented Jan 23, 2017

Are either of you still working on this change?

@ncheutin
Copy link
Author

Oops, I forgot about it, I lived with the same icon on all my feeds.
Unfortunately, I won't have time in the coming weeks to dive into the code (especially Ruby which would require much more time for me).

@HenryQW
Copy link

HenryQW commented Feb 6, 2017

Reeder for iOS doesn't fetch <atom:icon> but <icon>.

@h2ws
Copy link

h2ws commented Jul 14, 2021

I need the feature too.

@knu
Copy link
Member

knu commented Jul 18, 2021

Unfortunately, there seems to be nothing we can do here. I have already confirmed that none of the following works for Feedly or Inoreader, not to mention Chrome, Safari or Firefox.

  • <atom:icon> or <icon> in an RSS feed
  • <icon> or <image> in an ATOM feed
  • Link: <…> rel="icon", <…> rel="shortcut icon" response header

The only thing they look at is the /favicon.ico of the feed host. You cannot have a unique icon per feed.

@knu knu closed this as completed Jul 18, 2021
@knu
Copy link
Member

knu commented Jul 19, 2021

If anyone succeeds in making feed readers pick an image other than /favicon.ico, feel free to show me an example feed here. You don't have to hack Huginn, you just need an XML file and a static file hosting service to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants