Closed huphtur closed 4 years ago
@huphtur this is strange. Do you have a full Markdown content example to show, that doesn't work without the <
and >
?
Can you open a second issue for the settings part, so that it's easier to follow each topic? Thanks.
@huphtur ok, this is because you set linkify: false
in Markdown, and the code looks for a link.
Linkify was disabled to make sure line 10 doesn't turn into a link to demonstrate my example that dropping the Twitter URL in a markdown file does not work. Here's a branch without markdownit options, same problem. Line 10 doesn't turn into embed.
Just tried adding a twitter URL on the eleventy-plugin-embed-tweet-demo package and same problem. So looks like I understood the docs wrong?
Suggest changing:
In the source Markdown, it only needs the tweet URL on one single line:
https://twitter.com/KyleMitBTV/status/1211079569245114371
to:
In the source Markdown, it only needs the tweet URL on one single line:
<https://twitter.com/KyleMitBTV/status/1211079569245114371>
This way the plugin will look for a link and embed the tweet.
Let me know if that makes sense, and I'll fire of a PR for the doc change.
Linkify was disabled to make sure line 10 doesn't turn into a link to demonstrate my example that dropping the Twitter URL in a markdown file does not work
The plugin currently works by identifying a link to a tweet with the tweet URL as the content. So yes, if you remove link automation, you need to make it a link yourself.
I'll make a PR to also look for a tweet URL in a paragraph, without any link.
@huphtur can you try #9 to see if it fixes your issue?
Confirmed. Working 100%.
Not sure if bug or not, but URLs in my markdown do not automatically get linkified, so in order for autoEmbed to work in Markdown, I have to make the URL a hyperlink.
So instead of this:
https://twitter.com/KyleMitBTV/status/1211079569245114371
I have to do this:
<https://twitter.com/KyleMitBTV/status/1211079569245114371>
and then the plugin produces the publish.twitter.com embed.
Is it possible to pass some settings to this embed? Theme, language, limit context, and Do Not Track (see customization options).