How to customize the text in an embedded post?

For what it’s worth, here’s what I ended up doing:

  1. On my blog, I have a <div> with an id of forum-excerpt, which is hidden with display:none but contains the HTML that I’d like to show in the Discourse post. (I do this using some Jekyll / Liquid logic, but that shouldn’t really matter.)

  2. On my Discourse, I set the CSS selector for elements that are allowed in embeds to #forum-excerpt. Although the div is hidden on my actual page, the content shows up on the forum.

  3. I also uncheck Truncate the embedded posts.

  4. In the Embedded CSS section, I give .button a larger font. This is a small change but it makes the button to add a comment bigger.

  5. I have also customized the embed.continue, embed.start_discussion, and embed.imported_from text, which changes what shows up in the comments section on my website.

This means that I have full control over the HTML that shows up in the forum post. The HTML I give it is basically the equivalent of a OneBox- it’s a big thumbnail and a link to the main post.

This works pretty much perfectly for me, belated thank you for the help!

2 Likes