OneBox for embedded comment post

I’m experimenting with using Discourse as (among other things) a commenting engine for my sites, which are all generated with static site generators.

I’m looking for a way to have OneBox previews for the automatically-generated Discourse posts that correspond to the original posts, but that doesn’t seem to be possible.

I was hoping a solution such as was suggested here (Embedding Discourse Comments via Javascript - #370 by JimPas) would work, but it did not. When I attempted to put the link on a line by itself, Discourse replaced my new lines with traditional spaces and thus the line-by-itself was lost. No OneBox joy.

I’m testing the integration here: Deploying a Custom Build of Zola to Netlify

And the resulting Discourse page is here: Deploying a Custom Build of Zola to Netlify - - Eric Scouten :: Community

Since the source site is statically-generated, what is rendered is entirely under my control. Except that I can’t render differently based on user agent.

Any suggestions to get OneBox joy in my Discourse site?

1 Like