Rebuilding HTML on posts or topics

:bookmark: This guide explains how to manually rebuild HTML on posts and topics in Discourse, which can be useful for updating embedded metadata in links.

:person_raising_hand: Required user level: Administrators, Moderators, or Trust Level 4 users

Sometimes posts or topics in Discourse contain links with embedded metadata that needs to be updated. This guide will show you how to perform a manual HTML rebuild on posts that require attention.

Rebuilding HTML on a post

To manually rebuild HTML on a post:

  1. Click the ... icon near the bottom of the post.

  2. Select the “Wrench” icon.

  3. Click the “Rebuild HTML” option.

FAQs

Q: Do all users have the ability to rebuild HTML?
A: No, only staff users (administrators and moderators) and Trust Level 4 users have the ability to rebuild HTML.

Q: What if my links still aren’t updating after rebuilding the HTML on a post?
A: If links aren’t updating after rebuilding the HTML, it typically indicates an issue with the link itself. We recommend running both a working and non-working link through a service like Iframely to confirm the link with the embedded data is working correctly outside Discourse and contains all relevant oEmbed data.

Q: Is there an automatic process that rebuilds HTML on all posts?
A: Discourse automatically rebakes posts that have an outdated baked version (for example, after an upgrade) via a background job that runs every 15 minutes. However, this only affects posts whose internal baked version is out of date — it does not proactively re-fetch onebox or link metadata for all posts. For bulk rebaking, admins with console access can use the posts:rebake rake task.

Q: What’s the difference between rebaking and rebuilding HTML?
A: Rebaking and rebuilding HTML are mostly synonymous terms in Discourse. Both refer to the process of regenerating the HTML content of a post, which can update embedded metadata and oneboxes.

Last edited by @hugh 2024-07-30T23:56:27Z

Check documentPerform check on document:
8개의 좋아요

Trust level 4 user can also do that.

It would be great if there was not only Documentation for #documentation:admins and #documentation:moderators but also for TL4. Why is this one for admins and not for moderators?

2개의 좋아요

Thanks for mentioning this, I’ve added this to the guide, and I’ve also moved the guide to the #documentation:moderators category since all of the information here will also apply to site moderators.

3개의 좋아요