swyxio / swyxkit

An opinionated blog starter for SvelteKit + Tailwind + Netlify. Refreshed for SvelteKit 1.0!
https://swyxkit.netlify.app/
MIT License
675 stars 88 forks source link

Adding SvelteKit Embed #149

Open swyxio opened 1 year ago

swyxio commented 1 year ago

In #40 I added Twitter and Youtube embeds, but obviously there are lots more things to add.

@spences10 has been working on Sveltekit embed: https://www.npmjs.com/package/sveltekit-embed?activeTab=readme

However this does the normal MDSvex thing of directly importing components, which is not really ergonomic for a Github Issues CMS (#10) driven thing like I do on this blog. So I'm testing this:

{% embed hi %}

swyxio commented 1 year ago

Temporarily abandoning it because i couldnt figure out how to get it to work with mdsvex.compile

image

generates a <script> tag, which i cant use @html to just throw into a page like regular mdsvex output.

image

acidtone commented 1 year ago

@swyxio Did you ever figure this out? Do you think this problem is related to mine here: https://github.com/spences10/sveltekit-embed/issues/511