scientific-python / scientific-python-hugo-theme

Hugo theme based on the design for numpy.org
https://theme.scientific-python.org/
Other
19 stars 23 forks source link

Adding non-SVG custom footer icons #262

Open AA-Turner opened 1 year ago

AA-Turner commented 1 year ago

I wanted to add a icon for NumFOCUS in the footer social icons (``params.footer.socialmedia[0].icon), but I got the following error:

ERROR render of "page" failed: "S:\Development\Econ-ARK\econ-ark.org\themes\scientific-python-hugo-theme\layouts\_default\baseof.html:42:7": execute of template failed: template: _default/single.html:42:7: executing "_default/sing
le.html" at <partial "footer.html" .>: error calling partial: "S:\Development\Econ-ARK\econ-ark.org\themes\scientific-python-hugo-theme\layouts\partials\footer.html:38:20": execute of template failed: template: partials/footer.htm
l:38:20: executing "partials/footer.html" at <partial "svg-icon" .icon>: error calling partial: "S:\Development\Econ-ARK\econ-ark.org\themes\scientific-python-hugo-theme\layouts\partials\svg-icon.html:7:73": execute of template fa
iled: template: partials/svg-icon.html:7:73: executing "partials/svg-icon.html" at <$svg>: nil pointer evaluating resource.Resource.Content
ERROR render: failed to render pages: render of "page" failed: "S:\Development\Econ-ARK\econ-ark.org\themes\scientific-python-hugo-theme\layouts\_default\baseof.html:42:7": execute of template failed: template: _default/single.htm
l:42:7: executing "_default/single.html" at <partial "footer.html" .>: error calling partial: "S:\Development\Econ-ARK\econ-ark.org\themes\scientific-python-hugo-theme\layouts\partials\footer.html:38:20": execute of template faile
d: template: partials/footer.html:38:20: executing "partials/footer.html" at <partial "svg-icon" .icon>: error calling partial: "S:\Development\Econ-ARK\econ-ark.org\themes\scientific-python-hugo-theme\layouts\partials\svg-icon.ht
ml:7:73": execute of template failed: template: partials/svg-icon.html:7:73: executing "partials/svg-icon.html" at <$svg>: nil pointer evaluating resource.Resource.Content

I tried adding an image to assets/css/icons, but to no avail, as it was a PNG.

This is an issue partly as I couldn't find any info on the docs about custon icons, and secondly a request for if a built-in NumFOCUS icon might be added, or support for raster images (PNG, JPEG, WebP, etc?).

Thank you for making a great theme!

A

alphapapa commented 1 year ago

Hi,

Thanks for reporting this. I have some higher priorities at the moment, but I'll try to take a look at this next week.

I think I understand what you're doing here, but to be sure, would you please provide concrete steps to reproduce the problem? Thanks.