[Bug] Icon src property doesn't point to the correct path for the icons in static/icons/site.webmanifest
digitalbricklayer opened this issue · comments
I confirm:
- I am running the extended version of Hugo version 0.91.0 or above to build my site.
- I have read the Hugo Clarity theme documentation.
- I have used the example site's config files as reference.
- I have reviewed other issues in this repository and mine is not recorded.
Hugo version
0.121.1
Where is this bug showing up?
Other: Both, neither, or somewhere else.
Operating system
Ubuntu 23.04
Browser (if applicable)
No response
Current behavior
Current site.webmanifest file:
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
The src property of the Icon object is a root relative link pointing to an icon in the root of the site. The icon however is in /icons/ directory.
Expected behavior
Point the src property at the /icons directory in the root of the site:
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Steps to reproduce
Deploy the theme example site and then request the /icons/site.webmanifest file via curl. Then request one of the icons from the URL in the src property. curl will return a 404.
Relevant log output
No response
Related code
No response
Preferred solution
Change the Icons/src properties to point to the icons directory in the root such as /icons/x.png
. Or, remove the opening slash such as x.png
. If no leading slash is present, the spec assumes that the file is in the same directory as the site.webmanifest
file.
Other information
No response