How to customize the text in an embedded post?

I have a site where I publish various tutorials and blogs, and I use Discourse as both a forum and as comments using the embedding feature.

This mostly works great, except that when I create a new page on the main site, all of the content is included in the Discourse post. Some of my users don’t even know about the main site, because they always read the full post on the forum! Which is a problem because features like embedded code editors don’t work on Discourse, so it comes off as a buggy experience.

In a perfect world, the Discourse post would just be a short, very obvious link back to the original post on the main page. Maybe something like this:

View the original post here:

https://example.com

Replies to this thread will show as comments on the original post!

I’ve tried disabling the embed truncate setting as described in this thread, but that seems to hide the “show full post” button but still shows all of the content in the post.

I’ve also tried editing the embed.imported_from message, but that just changes the tiny text at the bottom that folks seem to already be missing.

I’ve also tried just editing the post manually after Discourse creates it, but the markdown is not rendered into HTML and shows up as plain text instead. This sounds similar to this issue: Customizing the "Embedding" Behavior by Disabling Show Full Post?

Is there a setting I’m missing, or some other trick I can use to customize the text in an auto-generated Discourse post? Maybe something I can include in the HTML of the main site to trick Discourse into showing the right thing? Or I’m not above just manually editing it, if there’s a way to fix the markdown rendering issue.

Thanks for any help y’all can offer!

1 Like