Add today's date to bookdown pdf_book output file name

Using the method here I can customize the knit button to append today's date to my output file name.

How can I do the same in a bookdown report so that the Build book button in RStudio can append today's date to my pdf output file name? Do I modify index.Rmd, _bookdown.yml, or _output.yml?

There is no easy way to do that without creating a wrapper around functions.

What you can do: Create a function that calls render_book() to convert to PDF and then rename the PDF output to get the date in it.

To customize the Build button, you would need to create a wrapper around bookdown::bookdown_site() to tweak it to add the date.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.