+ rstudio::distill = blogging

As part of my switch from using Hugo + RMarkdown to make my own blogs to using rstudio::distill to increase some of the simplicity that happens in my life—Hugo was just too much complexity and fragility and at times would just break. However, distill is something that I can use to directly integrate into my workflows as well as capture the raw manuscripts I’m working on (distill manuscripts are quite nice and can serve as a pre-print option as well).


Center for Environmental Studies


December 21, 2021

However, not everything I do is strictly R related so I thought it would be cool to see if I can hook up to serve as a secondary route for creating and integrating posts into my laboratory website.

The overall roadmap is as follows:

Let’s see how this can be done.

Exported File Types


A TextBundle is a different thing entirely. It is apparently ya single document bundle that contains two files:

  • A info.json bundle
  • A text.markdown text file.

There does not appear to be any tangible reason why a textBundle would be preferred over a single markdown file, so I’ll not consider it from here on.


You can specify the flavor of markdown and the built-in types include Github. There is a nice interface here to select certain options on it and the ability to put it into a single markdown file.

Screen Shot 2021-12-21 at 08.06.28.png

One of the other things that I didn’t quite appreciate was that for images, like the one inserted above,


Craft will include an online reference to it on their craft servers. This does allow me to not have to upload everything to my flickr account, which is both nice (less steps) but troubling (what would happen if the craft servers go down or craft goes away (i no longer have all my stuff in one place). I suppose I could easily suck down all the images and relink them in the markdown if necessary. For now, I’ll call that a win.

Markdown 2 Distill

For this one, I think I’ll make a cheap and quick R solution to this. For that I’ll pick up in the next installment, and do it from the R side.

For this, I will enforce the following general rules.

  1. I’ll have to configure a featured image separate from this file (there is no opportunity for finding the location of the Cover Image at the top.).
  2. The title will be moved form H1 to markdown metadata title.
  3. The first paragraph will be taken and used as the description for the markdown metadata description.
  4. Save the raw markdown to a _toImport folder in the git repository for the site. The next time the site is built, it will convert the raw markdown into a distill::article object and inserted in the appropriate place.

Once I get it all up and running, then I can wrap it all up in a shortcut.