-
DescriptionIt's maybe a bit of a silly question, but how could I set an icon in the navbar that is based on an image (e.g. .svg) from the local drive. So for example this is easily done for a github link: navbar:
right:
- icon: github
href: <some link to github> But if I cannot get it to work with a local image, for instance: navbar:
right:
- icon: _static/<some local image>.svg
href: <some link to somewhere> I'm wondering if this is possible and whether I'm missing something. Running on quarto 1.3.450 (stable release from the website). Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
I believe this fields only support Bootstrap icons as documented: https://quarto.org/docs/reference/projects/websites.html#nav-items
@dragonstyle any plans of making custom icons available ? |
Beta Was this translation helpful? Give feedback.
-
You can use the 'text' key wich supports markdown, thus anything you want. |
Beta Was this translation helpful? Give feedback.
-
@mcanouil and @cderv, thanks for the quick responses, I'll try it out and I'll get back to you. |
Beta Was this translation helpful? Give feedback.
-
Hello! As per the suggestion above, I'm trying this:
but I'm getting the error |
Beta Was this translation helpful? Give feedback.
-
I had to tweak this to get it work. Initially, markdown pointing to an SVG showed nothing (though the SVG was loading successfully in devtools). I converted the SVG to PNG and that .. sortof worked except the image was gigantic. The YAML below worked for both SVG and PNG: specifying the height:
I had initially solved my specific issue by installing the excellent Fontawesome extension which has a Bluesky brand icon. (Then the solution is just Using an image via markdown as above also works, but it doesn't get mouse-over color changes like a BI or FA icon. (The Bluesky icon should come to Bootstrap some day). |
Beta Was this translation helpful? Give feedback.
Ah, yes, that's it @mcanouil. I had tried quotes around the file name, but not around the entire chunk of text. The latter works, i.e.
Thanks for your prompt and helpful reply (as ever!)