rOpenSci | Miscellaneous Wisdom about R Markdown & Hugo Gained from Work on our Website

Whilst working on the blog guide, Stefanie Butland and I consolidated knowledge we had already gained, but it was also the opportunity to up our Rmd/Hugo technical game. Our website uses Hugo but not blogdown to render posts: every post is based on an .md file that is either written directly or knit from an .Rmd file. We wanted to provide clear guidance for both options, and to stick to the well-documented Hugo way of e.g. inserting figures. We also wanted to provide post contributors with an as smooth as possible workflow to create a new post. Working on this mission, unsurprisingly we learned a lot, and why not share our newly acquired technical know-how? In this post I shall go through four things we learned about Rmd/Hugo, while trying to provide context about the why of our using them.


This is a companion discussion topic for the original entry at https://ropensci.org/technotes/2020/04/23/rmd-learnings/
2 Likes

Very useful. Thanks !

2 Likes

Yay! Feel free to share about your own website work if you want. :slightly_smiling_face:

Sharing :wink: :
For my website I had to adapt the path of the image file to get the knitr plot hook working.
I had to ‘shift’ the image file 5 levels up. I documented this here .

1 Like

Interesting!* I’d be curious to see the website source to understand why the images are there. :thinking: Were you using a leaf bundle?

*: More interesting than the image. :joy:

PS: I was recently told one should avoid click here links.

I included already snippets of the html and md source and two references about the specification of the website (e.g. the Hugo config) in my blog entry about your article :wink:
And of course you can see the full html with pagesource or equivalent tool.

If I can do more to show how the website is constructed, let me know.

I will have to study the part of your article about ‘leaf bundles’ to be able to answer your question.

1 Like

Some things are easier to understand with the actual Hugo website source (like rOpenSci website source) but I understand not everyone can have theirs open. Yes leaf bundles might help, although since things work as is, maybe better not to tinker with then. :grinning: