Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build_rmds to use customs 'dir_blog' and 'dir_src' folders. #454

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ErickChacon
Copy link

@ErickChacon ErickChacon commented Apr 29, 2020

This allows to locate your Rmd files on a folder dir_src (default: ".") and your blog in another folder dir_blog (default: "content"). This add flexibility for different workflows. In particular, I am using blogdown to keep documentation and reproducibility of a project. An example of the structure is as follows:

.
├── data
├── docs                # web folder (includes `content`, `public`, 'static', ...)
├── Makefile            # makefile that uses `builds_rms` for each file
├── scripts             # Rmd scripts folder
└── src

Using blogdown:::build_rmds with parameters dir_src = "scripts" and dir_blog = "docs", will generate and move the files as follow:

scripts/clean/rainfall.Rmd    --> docs/clean/rainfall.Rmd
scripts/clean/rainfall.html   --> docs/content/clean/rainfall.html
scripts/clean/rainfall_files  --> docs/static/clean/rainfall_files
scripts/clean/rainfall_cache  --> docs/blogdown/clean/rainfall_cache

This is very useful because now I can use blogdown:::build_rmds inside a Makefile that defines the dependencies between my Rmd files and updates only what needs to be updated.

@cderv cderv requested a review from yihui February 28, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant