What

{blogsnip} is a package of RStudio addins for inserting code snippets.

The addins make it easier for me to write {blogdown} posts for rostrum.blog. You may or may not find them useful.

You can read about each function in the vignette, on the ‘references’ page of the {blogsnip} website or browse the source.

The blogsnip RStudio addin is demonstrated by selecting 'insert details block' from the addins menu, which creates an expandable details section when rendered from R Markdown to HTML.

The function bs_details_expand() via an RStudio addin

Install

Install from GitHub with:

install.packages("remotes")
remotes::install_github("matt-dray/blogsnip")

Restart RStudio and the addins will then be available from the ‘Addins’ menu in RStudio, listed under ‘BLOGSNIP’.

Contribute

Feel free to add or suggest new snippets. Please note that the ‘blogsnip’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.