Comments (11)
Oops, you're totally right, and I'm totally misremembering when it started working!
What actually worked for me was swapping the icon tag used for the base icons with a text tag. Of the 3 examples below, the first and third work, while the second does not:
website:
title: "Example"
navbar:
right:
- icon: twitter
href: https://twitter.com/bioboyd
- icon: "{{< fa brands twitter >}}"
href: https://twitter.com/bioboyd
- text: "{{< fa brands twitter >}}"
href: https://twitter.com/bioboyd
from fontawesome.
Thanks @B0ydT for the tip -- works great as text!
from fontawesome.
Hi folks, has anyone had any luck getting font awesome icons into the sidebar tools of a Quarto book? I've been fiddling with this for a while, and have followed the suggestions here, and don't seem to be able to get it working. I've used the following code:
sidebar:
tools:
- text: "{{< fa brands python >}}"
I've tried a few different things, including a few different icons (to make sure the issue isn't specific to certain subsets of icons) and testing the same approach in the navbar (works fine).
It's possible I'm missing something, but if anyone has any suggestions that would be much appreciated!
from fontawesome.
I would suggest to follow quarto-dev/quarto-cli#6359 because the issue here can't be adresse within the extension.
from fontawesome.
It's already working.
I added the lemon FA icon to the title within your _quarto.yml
.
Did you mean something else?
from fontawesome.
It did not work as an icon in the navbar, for example instead of rss-fill
.
from fontawesome.
I believe this and #7 (after looking more in the code) to be more a Quarto issue than an issue within the extension itself.
from fontawesome.
I looked at the rlille.fr site maintained by @mcanouil when building mine, looking for reasons his icons were showing up in the nav bar but mine weren't.
The only difference I could find was that he included this line in his styles.css file and I didn't. I'm not an expert so I don't quite know why it works, but it fixed my problem.
/* @import url(https://use.fontawesome.com/releases/v6.1.1/css/all.css); */
from fontawesome.
This was a test before Quarto extensions.
The complete file is actually "empty" (only comments in there) https://github.com/RLille/rlille.fr/blob/main/styles.css
To note, icons are included via shortcodes, thus in the text
keys.
from fontawesome.
icon
keys are parsed specifically to handle one icon library/version.
While text
keys are processed as regular markdown/raw code, leading to 1/3 working but not 2, in your last example.
@mine-cetinkaya-rundel did you use the shortcode in text
keys for the navbar or elsewhere, when it did not worked?
from fontawesome.
Alright, thanks for the heads up @mcanouil!
from fontawesome.
Related Issues (20)
- FA shortcode in indented text (pre/code block) not displaying icon HOT 2
- fontawesome not working with Quarto 0.9.644 HOT 2
- No longer working with self contained: true HOT 1
- Incorrect path to fonts generated with Quarto v1.2+ HOT 7
- Making the icons clickable HOT 1
- Issue while compiling html with quarto and fontawesome HOT 3
- lua errors when trying to render revealjs with fontawesome extension HOT 22
- The URL link disappers when switch tabs between souce and visual in Quarto HOT 2
- Issue deploying to netlify HOT 13
- FR: add color argument? HOT 3
- FEATURE: `style` key should optional in shortcode HOT 2
- How to access "regular" fontawesome icons? HOT 1
- `aria-label` option won't override default for icon? HOT 2
- Possibility to specify the color? HOT 4
- Any plans to support the new Twitter/X Logo? HOT 1
- Update fontawesome embed version
- feature request: turn on linking without using shortcodes HOT 4
- Support typst HOT 4
- Support more attributes in shortcodes for icon tag compatibility HOT 3
- Making this work in Quarto RevealJS in mermaid diagrams HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontawesome.