DaveParr / dev.to.ol

dev.to.ol helps R users publish to dev.to
Other
1 stars 0 forks source link

Separate knitting from posting? #2

Open maelle opened 4 years ago

maelle commented 4 years ago

Unsollicited opinion 😉 In hugodown the idea is that you knit and preview each post and then Hugo builds the site.

I am thinking of adopting a similar workflow for my not yet public Wordpress prototype.

Would it make sense for dev.to.ol to only render if the md is older than the Rmd maybe?

DaveParr commented 4 years ago

That's interesting. I hadn't really considered the workflow integration aspect at all.

So it sounds a little like this proposal would roughly equate to converting post_new_article into effectively 2 steps each with their own function?

One knit function and one post function? I'm not sure I'm understanding right. Could you point me towards where I can learn more about this concept? :)

maelle commented 4 years ago

For knitting I was imagining letting people use their usual workflow (like RStudio knit button), assuming the YAML has the correct output format.

The post function could still knit again if needed (a parameter maybe?)

These are all only suggestions!

hugodown https://github.com/r-lib/hugodown

My WIP (little progress) Wordpress repo https://github.com/maelle/goodpress

DaveParr commented 4 years ago

Something I have also been debating from a workflow perspective is updating an existing, published post. I think this should be possible through the dev.to API. A workflow like this might help there too, as the function should probably be able to check if the supplied article is newer/different than the old one.

maelle commented 4 years ago

In my Wordpress package what I plan to do is creating a text file in the post folder after the first upload, where I write the post ID. This way if the text file exists I can update the post instead of creating a new one.