quarto-dev / quarto-r

R interface to quarto-cli
https://quarto-dev.github.io/quarto-r/
146 stars 24 forks source link

Feature Request: `new_post` function / RStudio Addin #22

Open christian-million opened 2 years ago

christian-million commented 2 years ago

A function and/or RStudio Addin that allows users to create the skeleton for a new blog post. I used the new_post functionality in blogdown a lot and would love to incorporate a quarto version into my workflow.

Quarto comes with a "website:blog" project type, which signals a common-enough use case for this kind of functionality. For now, it could just create a new post in the posts directory (by default). Eventually it might use a dedicated "website:blog" yaml parameter to indicate which directory the new post should be located in?

Something like: (using quarto-web directory as example)

website:
  blog: docs/blog/posts

and then quarto::new_post("my_new_post") would create docs/blog/posts/my_new_post/index.qmd

njtierney commented 2 years ago

I would also really like some capacity to add this feature!

mccarthy-m-g commented 1 year ago

I made an RStudio new post addin for {distill} through the {distilltools} package awhile back (inspired by {blogdown}). Just mentioning it here since Quarto is a spiritual successor to {distill}, so some of the work there might be helpful in the implementation for this package. Here’s the relevant PR.