-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Watch and rebuild files in static/
#637
Comments
cderv
added
feature
a feature request or enhancement
next
to consider for next release
labels
Jun 29, 2021
FTR (just in case anyone finds my function above), I ended up needing to explicitly call .serve_site <- function() {
check_and_rebuild <- function() {
if (Sys.getenv("BLOGDOWN_SERVING_DIR", "") == "") {
message("Blogdown is no longer serving the site, not watching for changes")
return()
}
changed <- blogdown:::filter_timestamp(blogdown:::list_rmds(c("content", "static")))
if (length(changed)) {
changed_content <- changed[grepl("content/", changed, fixed = TRUE)]
if (length(changed_content)) {
blogdown:::build_rmds(changed_content)
}
blogdown::build_site(build_rmd = "timestamp")
}
later::later(check_and_rebuild, delay = 5)
}
blogdown::serve_site()
check_and_rebuild()
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For context, this is from a question by @gadenbuie
Ideally, this would be
serve_site()
Current workaround is
This should be possible to have this behavior built in, meaning whether to automatically knit Rmd under
static/
on saveThe text was updated successfully, but these errors were encountered: