Last active
July 15, 2022 21:48
-
-
Save schochastics/e752b82c5019dcbdd8ede7e8104f2be4 to your computer and use it in GitHub Desktop.
automatic styling and linking for R packages mentioned in quarto docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CRAN(handle) | |
local output = '<span class="cran-pkg"><a href="https://cran.r-project.org/package=' .. | |
pandoc.utils.stringify(handle) .. '">'.. | |
pandoc.utils.stringify(handle)..'</a><i class="fa-brands fa-r-project fa-2xs"></i></span>' | |
return pandoc.RawBlock('html', output) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure to install the fontawesome extension
Use with {{< CRAN ggplot2 >}}