distill icon indicating copy to clipboard operation
distill copied to clipboard

Setting highlight theme in `_site.yml` not applying site-wide

Open EllaKaye opened this issue 3 years ago • 2 comments

Hello,

I have a custom syntax highlighting theme. In my _site.yml, I have this for output:

output:
  distill::distill_article:
    highlight: /Users/ellakaye/ellakaye-distill/ek_syntax_highlighting.theme

However, when I create and knit a new post, it still highlights with the default theme. If I put the exact same three lines in the yaml of the .Rmd file for the post, the post picks up my custom file just fine. I would have thought that having the theme specific in the _site.yml would apply it site wide, but am I wrong about that, or is this a glitch?

I previously mentioned this issue in a comment on #295, but have been advised by @apreshill to open a new, separate issue for it.

EllaKaye avatar May 11 '21 13:05 EllaKaye

Posts aren't re-rendered when the site is re-rendered (so they don't pick up the site-level highlighting). This is something we could probably make work but it doesn't work currently. In the meantime, if you re-render the post it will get the new highlighting.

jjallaire avatar May 11 '21 14:05 jjallaire

Hi @jjallaire Thanks for your quick response. I was expecting to have to re-render old posts, but even after I did that, it still stuck to the default scheme, unless I specified the highlight argument in the .Rmd yaml for the post.

Moreover, even having added the highlight argument to _site.yml and rebuilt the site, when I then create a new post, it still goes to the default theme (again, unless I add highlight to the new post .Rmd yaml). That's why I wonder if there might be something glitchy going on.

EllaKaye avatar May 11 '21 14:05 EllaKaye