mcanouil / quarto-iconify

Use Iconify icons in HTML-based Quarto documents (over 200,000 open source vector icons)
https://m.canouil.dev/quarto-iconify/
MIT License
88 stars 0 forks source link

Would like this extension to work with the sidebar of a book project #9

Closed ercbk closed 11 months ago

ercbk commented 1 year ago

Saw in quarto issue "How to use custom icons?" (#5816) that this extension worked with the navbar of websites. I tried to get this work with the website sidebar of a book project, but I couldn't get the icon to appear.

book:
  sidebar: 
     tools: 
        - text: "{{< iconify fa6-regular heart >}}"
          href: https://ercbk.github.io/Statistical-Rethinking-Notebook/

I tried using "icon" instead of "text," but that doesn't work either. I also inserted the shortcode in one of HTML documents in the project, and it worked there. So, I figure the extension is installed correctly.
Anyways, I was wondering if it was possible to make this extension work with the website sidebar of quarto book projects. Thank you.

mcanouil commented 1 year ago

The issue is from Quarto, not the extension, as in this context "text" is used as title and aria-label.

<div class="sidebar-tools-main">
  <a href="https://ercbk.github.io/Statistical-Rethinking-Notebook/" rel="" title="{{< iconify fa6-regular heart >}}"
    class="quarto-navigation-tool px-1" aria-label="{{< iconify fa6-regular heart >}}">
    <i class="bi bi-"></i>
  </a>
</div>
image
ercbk commented 1 year ago

Thanks I'll bring it up with them.

mcanouil commented 1 year ago

To note, it might be intended to work this way. I started an informal discussion about this, but feel free to formally open an issue to ask about this.

See https://quarto.org/docs/reference/projects/books.html#sidebar-tools for the current (incomplete) documentation. I will also open some issues about the documentation itself.