I created my own format in Rmarkdown based on this blogpost. I implemented it in my personal package and it works great. I also added custom files in includes argument of html_document.
My question is whether it's possible to store my custom files (included in includes argument) after a click Knit button. Similarly to self_contained = F option which allows to store all Rmarkdown dependencies.
I should give you some context first. Let’s say I used my html format to create a report two months ago. Two weeks later I decided to implement major changes in my html format and updated my package.
After next two weeks, my boss came to me asking for adding minor changes in old report. Then, by clicking Knit button, the report was not able to create, because there was a new version of my html format, which was significantly different.
I see three possibilities how to deal with this request. Either I can install old version of my package (suboptimal), create a new html format every time I implement major changes or I can store my dependencies (header, footer, css files) in separate subdirectory (like a packrat). Then each report would be independent and immune to changes in my custom format.
Let me know if there is any better solution.
Cross-posted at https://github.com/rstudio/rmarkdown/issues/1212