You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inline R in blog yaml isn't executed on listing page #1505
Similarly, adding today's date via inline r seems to have some funky output
(I know this is not recommended for blogs, but it still seems to be undesirable behaviour)
yml
---
draft: false
title: A nice blog post
date: "`r date()`"
image: thumbnail.jpg
---
Similarly, adding today's date via inline r seems to have some funky output
For this we would definitely prefer that you use the built in functionality that does the same thing (though in a language agnostic way). More about the options here:
Agree that ideally this would work, but date is a use case that we could discourage and hope the built in support offers functionality sufficient to replace it.
I think this one may be different - I have a theory that the font awesome issue is that we're actually a little 'too smart' (by my recommendation :( ) in that LUA filter - we only inject the fontaweome CSS / fonts when we see that a shortcode was used on the page. I think the listing page isn't getting that CSS / font because we bring fully rendered HTML into the page in a post processor, and so LUA never sees the shortcode.
I haven't had time to test this yet, but I think if you add a FA element to a listing page itself, the ones in posts will start working (or alternatively you could just see if the listing contents include properly rendered FA HTML that we just aren't styling).
There are very fancy fixes for this in the long run (pages noting their dependencies and listing pages merging them) but in the short run we could also just make the font awesome dependency injection a little less smart :).
Thanks, I assumed this was something related to how CSS was injected (quarto-ext/fontawesome#7 (comment)), but was wondering with this issue if it was only that.
Activity
harrig12 commentedon Jul 23, 2022
Similarly, adding today's date via inline r seems to have some funky output
(I know this is not recommended for blogs, but it still seems to be undesirable behaviour)
yml
post result

listing result

dragonstyle commentedon Jul 23, 2022
I'll have a look - agree that this isn't desirable. Side note - we do compute reading and can display that in the blog listing:
For this we would definitely prefer that you use the built in functionality that does the same thing (though in a language agnostic way). More about the options here:
https://quarto.org/docs/reference/dates.html
Agree that ideally this would work, but date is a use case that we could discourage and hope the built in support offers functionality sufficient to replace it.
mcanouil commentedon Jul 23, 2022
@dragonstyle is this listing preview issue related to Font Awesome icons not showing up (quarto-ext/fontawesome#7)?
dragonstyle commentedon Jul 23, 2022
I think this one may be different - I have a theory that the font awesome issue is that we're actually a little 'too smart' (by my recommendation :( ) in that LUA filter - we only inject the fontaweome CSS / fonts when we see that a shortcode was used on the page. I think the listing page isn't getting that CSS / font because we bring fully rendered HTML into the page in a post processor, and so LUA never sees the shortcode.
I haven't had time to test this yet, but I think if you add a FA element to a listing page itself, the ones in posts will start working (or alternatively you could just see if the listing contents include properly rendered FA HTML that we just aren't styling).
There are very fancy fixes for this in the long run (pages noting their dependencies and listing pages merging them) but in the short run we could also just make the font awesome dependency injection a little less smart :).
mcanouil commentedon Jul 23, 2022
Thanks, I assumed this was something related to how CSS was injected (quarto-ext/fontawesome#7 (comment)), but was wondering with this issue if it was only that.
dragonstyle commentedon Jul 23, 2022
Nice you completely nailed it! I'm not totally confident that is the only issue but I think it will be the big one...
mcanouil commentedon Apr 28, 2024
Note that inline R code in YAML is not really supported in Quarto.
It works mostly as a side effect via
knitr.With current version, the R code is no longer evaluated anywhere in the example.
Note also that Quarto listing does include
reading-time, see https://quarto.org/docs/websites/website-listings.html#listing-fields.I am going to close this based on the above.
cscheid commentedon Apr 28, 2024
It is still a bug, though, even if it's not one that we can easily fix in the near future. I'm reopening this.