Open r-leyshon opened 1 year ago
Initially it appears that using the HTML syntax does not work. However, including at least one quarto syntax icon in the document allows both syntax types to render as expected.
This is because if you don't use the shortcode, then the fontawesome dependencies are not loaded into your document. The HTML deps are only inserted in document header when {{< fa ... >}}
is used - same for LaTeX dependencies.
If the shortcodes is not used, the the extension does nothing.
I see, so would is it possible to style the icon in the same way as I have above while using shortcode only?
Alternatively, is there a way to ensure fontawesome dependencies get loaded to a document whether or not a shortcode is found?
Regarding your request of not using shortcodes, this is asked in there already
is it possible to style the icon in the same way as I have above while using shortcode only?
Currently there is no way to pass any attributes using shortcode. Only a few is supported https://github.com/quarto-ext/fontawesome/blob/d334eba21d78ca27fe81d86f376e53e6c89b2cc9/_extensions/fontawesome/fontawesome.lua#L68-L71
Alternatively, is there a way to ensure fontawesome dependencies get loaded to a document whether or not a shortcode is found?
See #30 for a wild trick of display: none
Otherwise, don't use the shortcode, and directly use the fontawesome dependencies using include-in-header
and some raw HTML or use the Lua version of adding dependencies as mentioned in https://github.com/quarto-ext/fontawesome/issues/30#issuecomment-1721936271
I've discovered some curious behaviour when attempting to copy paste HTML code from the fontawesome site for use in quarto docs. Initially it appears that using the HTML syntax does not work. However, including at least one quarto syntax icon in the document allows both syntax types to render as expected. Below is a shell script to help reproduce the behaviour.