Helpers for porting a {blogdown} blog to a Quarto blog. Read more in the blogpost.
'bd2q' = '{blogdown} to Quarto'.
The aim is to help convert my live {blogdown} blog, rostrum.blog, to Quarto. It would be tedious to do this manually because there's nearly 150 posts.
The original source code is at matt-dray/rostrum-blog and the Quarto version will be at matt-dray/rostrum-blog-2. The package is for my own use, but might be useful to other {blogdown}-to-Quarto transitions. Your mileage may vary.
Three things are in scope for now: to create a Quarto-blog template repository; to organise the directory structure for posts and copy them over; to amend the content of the index.qmd file for each post.
To transfer from {blogdown} to Quarto:
create_template()to generate a Quarto blog templatetransfer_posts()to copy across posts from a {blogdown} blog with the correct structuretransfer_resources()to copy across resources from a {blogdown} blog with the correct structurecreate_and_transfer()a convenience function that runs the above three functions in one go (used mostly by me for testing)
To adjust the index.qmd file for each post:
update_resource_paths()to correct resource file paths in each postremove_line()to delete a single line from a post based on a provided regular expressionreplace_lines()to either remove a set of consecutive lines from a post matched to a provided character vector, or replace with a provided vector of consecutive lines.
Plenty of stuff is out of scope, like generating CSS styles, amending Quarto meta files, addressing linkrot, etc. The intent of the package is to automate the easier stuff. You'll probably have to do a lot of manual adjustment once you try to re-render the entire blog from scratch. Good luck to all of us.