r-lib / hugodown

Make websites with hugo and RMarkdown
https://hugodown.r-lib.org
Other
165 stars 24 forks source link

Create hugodown website from RStudio New Project menu? #62

Open maelle opened 4 years ago

maelle commented 4 years ago

From RStudio New Project menu, when distill is installed, one can select distill website / blog as a possible project. Would that be possible with hugodown? blogdown also supports that.

hadley commented 4 years ago

I'm not sure; can you make project templates just run a function?

maelle commented 4 years ago

Ah, that I don't know 🙂

apreshill commented 4 years ago

@maelle you read my mind! I was literally coming here to offer to make a project template (I think this can be done?). I can squeeze it in next week I think so will report back if it cannot be done :)

maelle commented 4 years ago

please do it before July the 3d :pray: just kidding but that's when I'll demo hugodown. :grin:

apreshill commented 4 years ago

Lol I cannot make any promises but I will at least know if I cannot do it by then 😭

cderv commented 4 years ago

I think it can be done pretty much like with blogdown project, where the project template runs the internal function blogdown:::blogdown_skeleton() to create the project. Project template can also have parameter with UI in the IDE. See https://github.com/rstudio/blogdown/blob/master/inst/rstudio/templates/project/skeleton.dcf

Documentation with another example : https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html#defining-the-template-function

But you may already know all that right ? 😄

maelle commented 3 years ago

I think I made it work for my own create_site_vanilla() in #85