Search code examples
r-markdownblogdown

Why blogdown::hugo_build() can't handle the Lua filters?


When I use Lua filters to change the text color in blogdown, the change works well after rmarkdown::render(),

but the changes can't show up after blogdown::hugo_build() and blogdown:::serve_site(). Can you please tell me why?

output:
  html_document:
    pandoc_args: --lua-filter=color-text.lua

Solution

  • Because blogdown::hugo_build() doesn't call Pandoc. Lua filters only work for Pandoc.

    blogdown::serve_site() might call Pandoc---it depends on the source file format. See Section 1.5 of the blogdown book. You didn't provide a reproducible example, so I'm unable to provide further help.