External Media, embedding Twitter, markdown not rendering

Aloha,

I have a question regarding embedding external media. Do I have to wrap an embedded link to different sites with a short code?

I was adding a twitter link like below to my blog post and after that link none of the short codes worked as well as the formatting. The markdown wasn’t rendered any more.

How can I properly embed twitter or other media?

Link to embed: Twitter Publish

Example:

bypassing chatgpt's content filter pic.twitter.com/RW9ZgaFhkU

— samczsun (@samczsun) December 2, 2022
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

AFAIK links do not break anything. What exactly were you adding and how?

Thanks for the reply.

I added this to the post between some text:

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">bypassing chatgpt&#39;s content filter <a href="https://t.co/RW9ZgaFhkU">pic.twitter.com/RW9ZgaFhkU</a></p>&mdash; samczsun (@samczsun) <a href="https://twitter.com/samczsun/status/1598564871653789696?ref_src=twsrc%5Etfw">December 2, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

IIRC HTML is not parsed by default in Markdown content. I think you should enable Twig processing with

process:
    twig: true

But not sure if this is the way to go

Aloha,
I tried your suggestion by adding it under the expert view to the configuration for the post.
It did not work. :frowning:

Here is an example:
The embed part above some text with the shortcode for an image between the text.

In the preview window you can see how everything is blobbed together

What config exactly did you add? Looks like you turned off markdown processing

@AlaskaTheBlog, I can confirm that Markdown is no longer correctly parsed beyond the embedded Twitter code string.

I guess Markdown is getting confused by parsing the string. To prevent Markdown from parsing a string, wrap the string inside a block-element like <div>twitter embed</div> or <p>twitter embed</p>.

See Markdown specs:

Note that Markdown formatting syntax is not processed within block-level HTML tags.

2 Likes

thanks. That’s done the trick.
I needed to wrap it in a div