Closed tomatic closed 1 year ago
It's a bit confusing, but the favicon is actually loaded from your website directly and not from Plausible. Because of this, there's a [https://github.com/brettohland/Plausible-Stats-Tidbyt-App/blob/main/plausible_stats.star#L102C1-L102C81](fixed set of favicon names that the widget will look for on the root of your website):
FAVICON_FILENAMES = ["/favicon.png", "/favicon-16x16.png", "/favicon-32x32.png"]
The custom favicon field is merely field where you can enter in the path to a folder that contains one of these named files. This follows historical president for desktop browsers.
I had to do it in this way because the folks over at Tidbyt disallow their widgets/apps from fetching arbitrary content from the web based on user input. I argued that this was a relatively safe risk as what I'm searching for is industry standard data.
I'm not sure which CMS you're currently using to power the shopstack.de site, but you'll need to be able to place a static file with one of the above names at a path on your web server that is within your domain. The default path that the widget would search for is: http://shopstack.de/favicon-16x16.png
. If you needed to place it somewhere else on your server, then the custom path option can be used to drill down to any arbitrary folder on your server: http://shopstack.de/<CUSTOM_PATH_IS_PLACED_HERE>/favicon-16x16.png
.
Hope that helps!
Thanks for the lightning-fast answer!
Just realized I could have figured it out by looking at the code...
In any case, works like a charm 👍
Any idea why the favicon isn't showing for a particular site? It doesn't load the favicon automatically, but even if I enter the relative path manually, it just shows the default "globe" placeholder. The favicon is showing in Plausible, just not in the Tidbyt app.
The site in question is https://shopstack.de/.