-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
keep_md option not used by blogdown::html_page #445
Comments
Thanks a lot for the investigation! I'm curious why you need the intermediate |
I have been playing around with a custom build script that caches the |
Thanks for the explanation! If you need the |
I guess that I want to cache the output of any code chunks so that I can avoid any problems with re-running the code in the future. You could probably get that from the HTML I suppose but not as easily. The blog post I wrote about it is here if you are interested https://lazappi.id.au/post/2020-04-09-caching-blogdown/. There are probably some things I don't fully understand so happy to hear feedback/corrections if you have any. |
Great blog post !
I understand what you are looking for is the implicit caching mechanism blogdown offer with Did you try any of the solution mentioned ?
I wonder what are your experience on those ? Thanks ! |
@cderv I haven't really tried either of those, I probably rushed into this without researching properly what the options were. That said I'm not sure either of those is ideal for what I wanted to do. Caching would need to be turned on for every chunk and it is harder to maintain and transfer than a (Apologies if this discussion has strayed too far from the original issue) |
The next version of blogdown will address this problem and allow you to re-render only the Rmd file that you want. Thanks! |
@lazappi I just read your blog post, and I feel there might be some misunderstanding. As @cderv quoted:
This is only true for That's why I didn't even mention The approach that you mentioned in your blog post is essentially exactly what Anyway, I still don't think the option BTW, if you have both I'm push another commit to provide an option for blogdown not to re-render any Rmd files at all, unless users explicitly click the |
With the current development version ( (cc @apreshill) |
Re: precedence, I cannot find Hugo documentation now on this, but I believe if there is an |
Hi
I have noticed that
blogdown::html_page()
does not make use of thekeep_md
option. For example this YAML frontmatter does not result in a.md
file as well as the.html
file.I believe this is related to this rmarkdown issue rstudio/rmarkdown#1558.
Not sure if this is the desired behaviour or not but there are two workarounds I have come up with.
Option 1 is create a new output format that checks for
keep_md
and passes other options on toblogdown::html_page()
.The other option is to use
rmarkdown::resolve_output_format()
to get the output format and then manually set thekeep_md
option.I think this is probably the easiest option as long as you always want the
.md
file. The best solution would be forblogdown::html_page()
to pass on thekeep_md
argument like above (if that is something you want to be able to do).If there is a better solution please let me know.
By filing an issue to this repo, I promise that
xfun::session_info('blogdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/blogdown')
.The text was updated successfully, but these errors were encountered: