I have been using Blogdown + Hugo + Netlify to maintain a blog from my Windows system. I created it using the workflow described in Summer of Blogdown with the only exception being that I used a different theme. This has been working brilliantly for a couple years.
Recently I updated R from 3.6.1 to 4.0.3. I did not uninstall 3.6.1 so within RStudio I can toggle back and forth between versions. I'm now trying to create my first new blogpost since the change and running into trouble when I try to use the Blogdown Add-In to create the post (with R running 4.0.3). Here are the things I'm noticing in the GUI that pops up to create new post that are unexpected:
unexpected: the "author" field auto-populated [not sure where it's getting the name from (it's a name I sometimes use for things like twitter but isn't in the TOML or anything else]; expected behavior --> field should be empty and I enter my name manually each post
unexpected: even though the interface says to make the new Rmd post within the "Post" folder, blogdown defaults to creating a new subfolder under the Post folder with the folder name identical to the new post title, and the new post file name "index"; expected behavior --> mardown creates the new post Rmd file in the "Post" folder with no additional subfolders
See attached image for additional details
In 4.0.3, when I manually manipulate the filepath / name to match what is done for 3.6.1 I can get the new Rmd file to appear in the Post folder but when I try to serve_site() nothing happens (it will not create the matching HTML in Post. When I try to serve_site() using 3.6.1 everything still behaves as expected and the site renders properly. I have made no changes recently to the TOML or any other part of the site as far as I'm aware.
I know that I can keep making posts under 3.6.1 but would prefer to get everything running properly on 4.0.3 if possible. Thank you for any help you could provide.
This is a new feature from blogdown 0.18: blogdown/NEWS.md at main · rstudio/blogdown · GitHub
It will use by default now whoami::fullname() if the whoami package is install.
You can set another default value using blogdown.author R option. (set it to "" if you want no value.
This is also a new behavior closer to Hugo best practice: blogdown will use Hugo's Page Bundle feature to organize the website now (It was opt-in before, but since blogdown 0.21, this is the default now). See about Page bundle:
We advice to use Page Bundle now as it has proven a better way to organize resource in a Hugo website, hence the default. If you really don't want Page bundle for your website, you can deactivate by setting option options(blogdown.new_bundle = FALSE). If you want to convert your old site not using page bundle yet to full page bundle use, there is a function for that to: blogdown::bundle_site()
I believe this is not related directly to R version. It is just that when you upgraded to R 4.0.3, you must have installed blogdown, and it installed the last version which lead to different version used for your website when you switch R version. Check the version in each R session using xfun::session_info("blogdown").
There are a lot of improvment in blogdown 0.21 and in the new version to come. You should read the NEWS file to get up to date with those.
We'll update the book and communicate on those changes in the RStudio blog very soon !
Thanks for your feedback by the way. That helps us see what is unexpected for users.
Very glad the Summer of Blogdown materials were helpful! We actually covered bundled Hugo posts, which were a newer innovation that came out after the initial release of the blogdown package. Here is where those slides start: https://summer-of-blogdown.netlify.app/03/#32
We recently switched to bundled posts as the default as @cderv mentioned because we have all been using bundled posts for > 2 years and know it is a drastically better workflow than using static/ to organize your external post files. I'm sorry for the surprise change in your experience, but I'm confident you'll find the experience of maintaining and adding content to your site easier this way. Part of the reason we wanted to change it as a default was to help users discover this feature- it was a total Hugo gamechanger
@apreshill@cderv Thank you so much - this is very helpful. I'm sure I updated all the packages when moving to 4.0.3 so this explanation makes perfect sense. I would like to update to bundled format but really don't want to mess up my site. A couple questions:
cderv said that in order to update my site I would use blogdown::bundle_site(). So to be clear, for those with existing, pre-bundled blogs, is the plan to first use bundle_site() to convert all old posts to the bundled format, then for future posts you would use the workflow from April's linked Spoonful of Hugo blogpost? I have a lot of loose images, gifs, and excel files in my current Post folder that go with the individual blogposts.... should bundle_site() be able to accommodate this? I assume so but just don't want to break things. Is there some preferred way to back things up in case bundle_site() breaks things? Or can you switch it back?