gingerman
(ginger man)
November 16, 2021, 5:24am
2
Similar question in the past →
I know that Discourse lets use now change text almost everyone on the site through the admin panel, but is there a way to do something like find and replace all?
I know categories and topics are fundamental to how Discourse was built, but what if I wanted to match the experience of the forum I’m migrated to and instead wanted to use ‘Forums’ to replace ‘Categories’ and ‘Threads’ to replace to ‘Topics’. ?
If you are tech-savvy, there are couple of options for bulk replacement of strings in posts which theoretically can be extended to do what you are looking for
==> Discourse-post-process <==
I’m happy to introduce this simple but powerful Node.js script that uses the Discourse API to mass-modify Discourse posts. It essentially performs a regexp-based search & replace across all posts in a forum.
After migrating a few thousand posts from MyBB to Discourse, there was various little tweaks that needed to be made (fix BBCode → Markdown conversion, re-attach attachments, fix @username mentions when the usernames have changed etc.) I’m not a Ruby coder, an…
Want to replace a string in all the posts? Let’s do it!
Access your site
First connect to your Droplet via SSH, and enter the Docker container for your Discourse instances:
cd /var/discourse
./launcher enter app
WARNING
We strongly recommend you take a full backup before proceeding, and make sure your string replacement is specific enough to affect only the places you want it to. If this string replacement goes wrong, every post on your site will look broken!
Remap all posts cont…
2 Likes