astro-embeds-integration

1.0.0-beta.1 • Public • Published

astro-embeds-integration

This is an experimental Astro integration that allows you to auto-convert URLs in MDX files to a corresponding embed component.

Install

pnpm i astro-embeds-integration

Usage

To enable the integration, add it to the integrations array in your astro.config.mjs file:

import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import embeds from 'astro-embeds-integration'

export default defineConfig({
  integrations: [
    embeds(),
    mdx()
  ],
})

With the integration enabled, any isolated URL in an MDX file that matches one of the astro-embeds component types will be converted to the appropriate component.

For example, MDX like this will render an optimized YouTube player component in place of the URL.

I saw this cool video the other day:

https://youtu.be/J0XV9W6TxYk

Readme

Keywords

none

Package Sidebar

Install

npm i astro-embeds-integration

Weekly Downloads

0

Version

1.0.0-beta.1

License

MIT

Unpacked Size

5.29 kB

Total Files

4

Last publish

Collaborators

  • redwerkz