You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #28, in the heroicon package the icons are actually stored in a zip file to save space. This poses a problem for how Wagtail deals with SVG icons, as it expects the SVG to be a template somewhere where a template loader can find it.
As far as I can tell, Django does not come with a way to load templates from a zip. We may need to write a custom one, utilizing heroicons._load_icon or heroicons._render_icon in some way.
Native namespace packages is I think the right way to do this (probably), provided you can install them as extras. I think you can, but testing will need to be done to check.
joshuadavidthomas
changed the title
Explore writing a custom Template loader to load from zip file
Move to native namespace packages for sifferent icon types
Mar 23, 2024
Related to #28, in the
heroicon
package the icons are actually stored in a zip file to save space. This poses a problem for how Wagtail deals with SVG icons, as it expects the SVG to be a template somewhere where a template loader can find it.As far as I can tell, Django does not come with a way to load templates from a zip. We may need to write a custom one, utilizing
heroicons._load_icon
orheroicons._render_icon
in some way.https://docs.djangoproject.com/en/4.1/ref/templates/api/#custom-loaders
The text was updated successfully, but these errors were encountered: