How to use a favicon with ember-cli?

redOctober13 picture redOctober13 · Sep 3, 2014 · Viewed 7k times · Source

I had a favicon working for a while on my index template, but not any any other template, and now even my index template won't show it.

I'm just in development, so I'm using ember server.

index.html
<link rel="icon" href="favicon.ico">

Just throwing around my favicon to see if it shows up anywhere, I now have it in the following locations: app/ public/ public/assets

I think this should be very straightforward, especially since the index page doesn't change, just get's new stuff loaded into its outlets, so I can't figure out why it can't find my favicon file.

When running ember server, where actually is the / root pointing to?

Answer

Dhaulagiri picture Dhaulagiri · Sep 3, 2014

If you keep the favicon file in public/assets/ you can reference it like this:

<link rel="icon" href="/assets/favicon.ico">

The Ember CLI docs have a good section on this