joethei/obsidian-link-favicon

favicons for google drive documents should reflect the type of document

Opened this issue · 1 comments

For example, docs, sheets, slides, etc... This is handled well natively in the google suite products. Maybe you could enable something similar for Obsidian?

I just came looking for this exact thing. The problem is that Google hosts all documents at the same domain: docs.google.com which defaults to the G logo. This is then dynamically changed in the browser when it loads a specific document's url like docs.google.com/document/... or docs.google.com/presentation/.... The plugin only sends the domain to the favicon providers so they have no way of knowing which icon it should be from the rest of the URL.

Playing around with it a little bit, the favicon providers do return the correct icons for links like slides.google.com and sheets.google.com which used to be the hosted URLs. (I don't know what the base one for "Word type docs" would be other than docs.google.com which doesn't work)
2024-06-03_13-00

I'm not sure how many other sites do this sort of "multiple sites with different icons at the same domain". I would be worried adding specific overrides for google's URLs to the plugin itself as that could quickly lead to many custom overrides for different sites that need to be kept updated any time any of them changes.

I'd propose a system like the icon override that currently exists that allows us to point to an actual image file (url/regex -> local vault file) or map a full url to a different domain (url/regex -> domain to use instead, docs.google.com/presentation -> slides.google.com). This could then be maintained by users themselves, maybe with a guide in the README for specific cases like google docs'