Open rodrigoantas opened 4 weeks ago
I don't think there's any build-in way to update svg inside <img />
tag.
So, what you can do is replace <img />
tag with your svg logo.
From this
<a href="/" class="logo whitespace-nowrap">
{
LOGO_IMAGE.enable ? (
<img
src={`/assets/${LOGO_IMAGE.svg ? "logo.svg" : "logo.png"}`}
alt={SITE.title}
width={LOGO_IMAGE.width}
height={LOGO_IMAGE.height}
/>
) : (
SITE.title
)
}
</a>
To this
<a href="/" class="logo whitespace-nowrap">
<svg
class="fill-skin-base"
// others
/>
</a>
at the
Header.astro
we have the{ LOGO_IMAGE.enable ? ( <img src={`/assets/${LOGO_IMAGE.svg ? "logo.svg" : "logo.png"}`} alt={SITE.title} width={LOGO_IMAGE.width} height={LOGO_IMAGE.height} class="header-icon" /> ) : ( SITE.title ) }
this img is referencing a svg. how can i set the color of the svg to be on the theme?