SQLpage icon indicating copy to clipboard operation
SQLpage copied to clipboard

Support custom favicon location and manifest.json

Open djyotta opened this issue 9 months ago • 2 comments

I like to provide a PWA for mobile devices.

Currently, no manifest.json is served at all (requires a meta link in HTML header as far as I know).

Similarly, the favicon is served, but the location is not configurable (relies on browser looking for domain.com/favicon.ico).

I'm not able to provide a PWA without the meta link in the shell component.

I guess I can work around with a custom shell component, but for now I forego the PWA.

The favicon I am also not serving, as it affects my entire domain root favicon.

Describe the solution you'd like

We should:

  • serve manifest.json from root or site-prefix if exists (default meta link) - this could default to off
  • serve favicon from root or site-prefix (add meta link)
  • allow user to override defaults (set custom location for manifest.json and favicon.ico)

Describe alternatives you've considered

I tried routing the favicon via my reverse proxy, but it affects the whole domain. I need the meta link to tell the browser where to look other than the domain root.

These commits show what I would like (the tag in the HTML

):
  • https://github.com/lovasoa/SQLpage/pull/311/commits/e09e1dbb5a084854fab1c430522b138b5f6d870e
  • https://github.com/lovasoa/SQLpage/pull/311/commits/97d9a3c250f125d829d82141766c88b0d66c260f

But we need to implement it through the shell component.

djyotta avatar May 14 '24 11:05 djyotta

Would you be ok with just adding a favicon and a manifest properties to the shell component ? Could you make a pr with just these changes ? I'm not sure testing and refreshing the existence of favicon.ico and manifest.json is worth it or even desired.

lovasoa avatar May 14 '24 13:05 lovasoa

Properties on the shell component is fine. I'll take a look when I get a moment.

djyotta avatar May 15 '24 07:05 djyotta