A template is not supposed to provide any content (exampleSite is for
that). Media files are considered to be ok - I think. Things like
horizontal patterns (line.png) and so on.
But what about favicons?
Things are easy as long as a theme template just loads one favicon
e.g. favivon.ico. Themes can include this one
(e.g. static/images/favicon.ico), provide the loading in a partial and
a project can overwrite the file with itβs own static/images/favicon.ico.
But
The favicons have gone crazy.
With so many platforms and icons, itβs hard to know exactly what you
should do. What are the dimensions of favicon.ico? How many Touch
icons do I need?
I use https://realfavicongenerator.net/ to overcome this.
But then we can end up with:
static/images/favicons/
βββ android-chrome-144x144.png
βββ android-chrome-192x192.png
βββ android-chrome-256x256.png
βββ android-chrome-36x36.png
βββ android-chrome-48x48.png
βββ android-chrome-72x72.png
βββ android-chrome-96x96.png
βββ apple-touch-icon-114x114.png
βββ apple-touch-icon-114x114-precomposed.png
βββ apple-touch-icon-120x120.png
βββ apple-touch-icon-120x120-precomposed.png
βββ apple-touch-icon-144x144.png
βββ apple-touch-icon-144x144-precomposed.png
βββ apple-touch-icon-152x152.png
βββ apple-touch-icon-152x152-precomposed.png
βββ apple-touch-icon-180x180.png
βββ apple-touch-icon-180x180-precomposed.png
βββ apple-touch-icon-57x57.png
βββ apple-touch-icon-57x57-precomposed.png
βββ apple-touch-icon-60x60.png
βββ apple-touch-icon-60x60-precomposed.png
βββ apple-touch-icon-72x72.png
βββ apple-touch-icon-72x72-precomposed.png
βββ apple-touch-icon-76x76.png
βββ apple-touch-icon-76x76-precomposed.png
βββ apple-touch-icon.png
βββ apple-touch-icon-precomposed.png
βββ browserconfig.xml
βββ favicon-16x16.png
βββ favicon-32x32.png
βββ favicon.ico
βββ manifest.json
βββ mstile-144x144.png
βββ mstile-150x150.png
βββ mstile-310x150.png
βββ mstile-310x310.png
βββ mstile-70x70.png
βββ safari-pinned-tab.svg
expecting a project to overload all those files.
A βfaviconβ partial could look like:
<link rel="apple-touch-icon" sizes="180x180" href="{{ relURL "/images/favicons/apple-touch-icon.png" }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ relURL "/images/favicons/favicon-32x32.png" }}" />
<link rel="icon" type="image/png" sizes="192x192" href="{{ relURL "/images/favicons/android-chrome-192x192.png" }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ relURL "/images/favicons/favicon-16x16.png" }}" />
<link rel="manifest" href="{{ relURL "/images/favicons/manifest.json" }}" />
<link rel="mask-icon" color="#5bbad5" href="{{ relURL "/images/favicons/safari-pinned-tab.svg" }}" />
<link rel="shortcut icon" href="{{ relURL "/images/favicons/favicon.ico" }}" />
<meta name="msapplication-TileImage" content="{{ relURL "/images/favicons/mstile-144x144.png" }}" />
<meta name="msapplication-config" content="{{ relURL "/images/favicons/browserconfig.xml" }}" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
What do you think:
Should a theme provide all files given in the βfaviconβ partial
<link rel= ...
<meta name= ...
and an βemptyβ browserconfig.xml ?