Distill for R Markdown

R

Web publishing optimised for scientific and technical communication

shikokuchuo
05-04-2021

Created using Distill

This website was created using Distill for R Markdown, a web publishing format optimised for scientific and technical communication.

Key advantages

Installation

Install release version of Distill from CRAN:

install.packages("distill")

Distill blog hosted on Github Pages step-by-step instructions

  1. Create a new blog at /blog of your current working directory in R:
distill::create_blog(dir = "blog", title = "My New Blog", gh_pages = TRUE)
  1. Make some inital changes to _site.yml. Select the ‘build’ tab in RStudio and hit ‘Build Website’. This will generate the website.

    Note: building the website does not generate blog posts. Each time the website is re-built, only the .Rmd files in the base directory will be automatically re-generated.

  2. Modify the yaml front matter and content of the example blog post. Then hit ‘Knit’ in RStudio to generate the post.

    Note: after every change made to posts or after creating a new post, you must knit each post separately. The listings page is then automatically updated.

  3. Create README.md, license.txt and CNAME if using a customm domain.

  4. Create a new repository at Github.

  5. To set up git and add your new repository as a remote, bring up the command line, cd to your new blog directory and:

git init
git add .
git commit -m "initial commit"
git branch -M main
git remote add origin git@github.com:username/nameofnew.git
git push -u origin main
  1. At Github, under your new repository, go to Settings >> Pages, set your source branch to ‘main’, and folder to ‘docs’.
    Tick ‘Enforce HTTPS’ (recommended).
    If using a custom domain name, it should be configured automatically if you have previously set up your DNS settings to point to Github’s servers.

Congratulations, your new website should now be online!

References

The Distill Reference: https://rstudio.github.io/distill/

The Definitive R Markdown Guide: https://bookdown.org/yihui/rmarkdown/

Citation

For attribution, please cite this work as

shikokuchuo (2021, May 4). shikokuchuo{net}: Distill for R Markdown. Retrieved from https://shikokuchuo.net/posts/04-distill/

BibTeX citation

@misc{shikokuchuo2021distill,
  author = {shikokuchuo, },
  title = {shikokuchuo{net}: Distill for R Markdown},
  url = {https://shikokuchuo.net/posts/04-distill/},
  year = {2021}
}