Rebuild HTML for entire topic

(Joshua Rosenfeld) #1

At the moment, Discourse provides staff the option to rebuild the HTML of a post. Could this be expanded to be done in an entire topic? We recently had to rebuild the HTML of a large topic, which was quite tedious as it takes 3 clicks per post to rebuild (hidden post options, post wrench, rebuild).

(TomG) #2

I think this could be done via the console for all posts on a site:

./launcher enter app
rake posts:rebake

Best wait for a dev to confirm though.

(Régis Hanol) #3

This will rebake all the posts of the forum. There’s currently no way to specify a topic_id.

(Joshua Rosenfeld) #4

Right - and as you said it requires console access, something that not all sites have. Happy to see @zogstrip say “currently”, hopefully this is something that could end up on a roadmap eventually :slight_smile:.

(Jeff Atwood) #5

I believe the last time @techapj worked on this, he made it so the rebake goes in reverse chronological order, that is, it rebakes NEWEST posts first. That is usually what you want, because if you have a lot of topics, you want the stuff people are actually reading (aka the newer topics) to be corrected earlier.

(Arpit Jalan) #12

I did this for a special friend of ours by manually patching the rake task on server with my unoptimized hack. It got the work done but since the code was not optimized, I did not commit it to our source code.

I’ll add it on my list to come up with a good solution for this. Done via:

(Bart) #15

I’ve split off a separate topic for this project as I’m moving into another direction as the original post: