Closed erex closed 2 hours ago
Any experience of using Clarity with a pkgdown site? I have used the following code in _pkgdown.yml
_pkgdown.yml
primary: "#0542a3" base_font: {google: "Roboto"} includes: in_header: - file: Clarity.txt
resulting in this inside the index.html
index.html
<body> <p> list(file = "Clarity.txt")
I would have expected the includes in_header: to have placed the file within the
includes in_header:
as it has done with an ordinary Quarto website:
<script src="https://kit.fontawesome.com/78ddb093ea.js" crossorigin="anonymous"></script> <script type="text/javascript"> (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "lo7j6sob8t"); </script> <link rel="stylesheet" href="styles.css"> </head>
Am I misunderstanding how files are to be included as part of the header of a rendered pkgdown site?
You'd need to paste the content directly into the yaml, here's an example:
https://github.com/tidyverse/tidytemplate/blob/42cf848c5a5e082f9d95ae2ae2c7804b65d097ef/_pkgdown.yml#L5-L7
Thanks @jayhesselberth, appreciate the fast and accurate help.
Any experience of using Clarity with a pkgdown site? I have used the following code in
_pkgdown.yml
resulting in this inside the
index.html
I would have expected the
includes in_header:
to have placed the file within theas it has done with an ordinary Quarto website:
Am I misunderstanding how files are to be included as part of the header of a rendered pkgdown site?