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

Bug: Favicon Not Being Used by RSS Readers #4869

Closed
dbalders opened this issue Jan 29, 2015 · 8 comments
Closed

Bug: Favicon Not Being Used by RSS Readers #4869

dbalders opened this issue Jan 29, 2015 · 8 comments
Labels
bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with server / core Issues relating to the server or core of Ghost

Comments

@dbalders
Copy link
Member

Most rss readers like feedburner and feedly look for favicons automatically at the website root (ex. blog.com/favicon.ico). The problem with this, is that when you have a favicon in your theme, the default favicon still shows up at the website root because the theme favicon lives in 'blog.com/assets/favicon.ico'.

The favicon works just fine in browsers because you can specify the location in the html, the only problem is when there is a direct request specifically for the favicon at the root that the default shows up instead of the custom one.

Ex. http://ghostforbeginners.com/favicon.ico shows the default, but the site has its own custom favicon working just fine.

@ErisDS
Copy link
Member

ErisDS commented Jan 29, 2015

Note: browsers heavily cache favicon requests, so if you visit the site normally first, and then go directly to the favicon, you may see the custom one.

There are 2 potential solutions to this:

  1. lookup and cache which favicon to serve when a theme is activated
  2. create a new setting and item in settings to upload the favicon file

2 Possibly makes more sense, as for most people, switching theme wouldn't necessitate switching the favicon, but it has the downside of being yet-another-setting.

@nuclearpengy
Copy link

I dig the idea of being able to upload and set the favicon via the GUI.

What would be great is if the workflow could guide users and perhaps provide a crop function so they could upload any image and then crop it to the size of the file we end up serving, particularly for less technically minded users.

@nuclearpengy
Copy link

another thought I just had is to automatically use the site "Blog Logo" as the favicon...

@ErisDS
Copy link
Member

ErisDS commented Jan 30, 2015

What would be great is if the workflow could guide users and perhaps provide a crop function so they could upload any image and then crop it to the size of the file we end up serving, particularly for less technically minded users.

See #4453 - if you can find a way to do the server side cropping in JS without external dependencies and to then create the .ico format then I would merge the PR ;) We'd love to be able to have one logo upload and generate all manner of icons from it, but as far as I am aware, it's pretty much a pipe dream at present. Would ❤️ to be proved wrong.

Image processing chat should probably be moved onto #4453, because although a logo-to-icon UI is definitely a nice idea, it is a new feature with a lot of deep requirements rather than being a fix for the bug described here.

@JNeitzel
Copy link

As a sidenote, I was doing some local casper customization for one of my blogs after I updated to 0.5.8, and I can verify what @dbalders wrote. Perhaps off-topic here (IDK)? But even putting a favicon.ico file at my theme root (as well as in the assets directory) does not suffice. As a workaround, I simply replaced the default favicon file located at my/path/to/core/shared/favicon.ico with the one I wanted to use. The result works for me here. Hope this helps. Cheers.

@ErisDS
Copy link
Member

ErisDS commented Jan 30, 2015

Putting a favicon.ico in your theme root won't have any impact, because Ghost doesn't serve directories, it serves requests - it's a different approach which is common across ruby/python/node but quite different to the PHP / plain HTML web which is based on documents in a folder structure.

The way to use a custom favicon is to put it in assets and use the asset helper: http://themes.ghost.org/v0.5.8/docs/asset#favicons

This will work when requesting pages from the theme, but does not work when making a direct request to the file, because in this case the browser is not being told to request the correct file. That's what the bug is here - we need to add additional logic to override the favicon regardless of how it's requested.

@JNeitzel
Copy link

Thanks, I gotcha on all that. I'm using the asset helper (as noted in the docs) to get my favicon from my assets dir and moved the one from my theme root to the shared directory. No problem.

I've some time to explore the adding "additional logic" thing, but I've not contributed to before. I've read the Contribute page, and I'm exploring the favicon-relevant bits in core/server at present. I'll see what I can do. Thanks again.

@nuclearpengy
Copy link

@ErisDS noted, thanks. Scurries off to read more on #4453

@ErisDS ErisDS added the themes label Apr 11, 2015
@ErisDS ErisDS added help wanted [triage] Ideal issues for contributors to help with bug [triage] something behaving unexpectedly labels Oct 9, 2015
@kirrg001 kirrg001 added the server / core Issues relating to the server or core of Ghost label May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants