RSS customization conflict with rmarkdown::render_site()
As mentionned in https://github.com/rstudio/distill/issues/376, https://github.com/rstudio/distill/pull/380 solved the issue of the impossibility to custom the RSS to be a full-content RSS.
However, running :
==> rmarkdown::render_site(encoding = 'UTF-8')
To browse the website a second to check everything is okay, will revert the RSS / index.xml to its non custom version, with only the summaary of the articles.
Thanks for opening a new one. I don't know perfectly the codebase on rss feed creation and I may have missed something. I'll have a look
I can reproduce. There is indeed something not right.
During site rendering we are rebuilding the post.json file that shares metadata, and then the rss xml file. In the former, input_files information is missing, which leads to the latter not including the full content. This new xml override the previous which had the information.
We have definitely a bug in this process - I need to understand more deeply how this is supposed to work.
After a bit of archeology, it seems this part is a bit more complex.
#189 was supposed to offer a fix, but it was reverted (https://github.com/rstudio/distill/pull/189#issuecomment-703969597, 6e3da92). Then another approach in https://github.com/rstudio/distill/pull/190 was not ok with distill philosophy.
The issue we have here is that using rmarkdown::render_site() on a distill blog with RSS feed will regenerate the feed entirely but with no way to you use a full content feed because one information required is only passed during the knitting of a post (input_file.
During render_site, this does not exist so the old information in the XML file, generated during the first render are not kept.
https://github.com/rstudio/distill/blob/cd7cf53ad0069a4b221baadb1dfedf433723e040/R/sitemap.R#L246-L252
We have this limitation because we do not want to rebuild each Rmd post when render_site() is ran, and we need to render a file for the full_content feature to work. This is done the first time when building the post and the information is lost after. We need to keep the information in the XML file that where generated in the first build even during render_site(): Either the full content information is there, and we keep it, or we ignore full content and use the short description - only a rebuild of a post would add the full content to the XML feed.
Fixing this needs more thinking to find the correct way to do this. 🤔
Indeed. I understand for the Rmd, I don't want either to rerun a full 3 hours training of network. Actually it bothered me last time too when I had to rebuilt it again to "repair" the RSS.
What about :
rmarkdown::render_site(RSS=False)
Where RSS=TRUE is the default ?
What about : rmarkdown::render_site(RSS=False) Where RSS=TRUE is the default ?
Sorry, I am not quite sure to understand the suggestion here; Can you clarify ?
What about : rmarkdown::render_site(RSS=False) Where RSS=TRUE is the default ?
Sorry, I am not quite sure to understand the suggestion here; Can you clarify ?
Sorry. I mean, what about making the rebuild of the RSS optionnal ? (with the default set to true).
Looks like this problem persists. Makes it impossible to have R-Bloggers accept the blog, because they require full content feed.
Pretty please can this issue get some attention? I appreciate the distill world, so much easier than alternatives.