Hacker News new | ask | show | jobs
by ShamblingMound 1712 days ago
If anyone knows of a flexible static site generator that can process Rmarkdown files, I'd be interested to know about it.

There is `rmarkdown::site` (see [0]), but I had to mess with the internals to get it to do what I wanted.

[0]: https://rmarkdown.rstudio.com/lesson-13.html

2 comments

The key idea of soupault is that it works on the HTML element tree level and can automatically call external convertors on pages (based on page file extensions, see [1]), so the input format doesn't matter to it.

You can bring your own convertors and pass any options to them. I'm not saying it's a perfect SSG for everyone, but at least uncommon input format support isn't an intractable problem for it.

[1] https://github.com/dmbaturin/soupault-website/blob/master/so...

Thanks, that is a great feature.
On jamstack.org's list of static generators[0] you can filter by template language. For "R markdown" it only has: Bookdown[1], Rmarkdown as you mentioned, and Blogdown[2].

I've never looked at R markdown before. Thanks for sending me down the rabbit hole with Bookdown. It might solve one of the questions I'm currently thinking about.

[0]: https://jamstack.org/generators/ [1]: https://bookdown.org/ [2]: https://bookdown.org/yihui/blogdown