diff --git a/src/components/notion-blocks/CodePenEmbed.astro b/src/components/notion-blocks/CodePenEmbed.astro new file mode 100644 index 000000000..90f652a95 --- /dev/null +++ b/src/components/notion-blocks/CodePenEmbed.astro @@ -0,0 +1,26 @@ +--- +export interface Props { + url: string +} +const { url } = Astro.props +const user = url.pathname.split('/')[1] +const id = url.pathname.split('/')[3] +--- + +
+ + + diff --git a/src/components/notion-blocks/Embed.astro b/src/components/notion-blocks/Embed.astro index ca7a54e9c..ba5b78aba 100644 --- a/src/components/notion-blocks/Embed.astro +++ b/src/components/notion-blocks/Embed.astro @@ -5,12 +5,14 @@ import { isTikTokURL, isInstagramURL, isPinterestURL, + isCodePenURL, } from '../../lib/blog-helpers.ts' import Bookmark from './Bookmark.astro' import TweetEmbed from './TweetEmbed.astro' import TikTokEmbed from './TikTokEmbed.astro' import InstagramEmbed from './InstagramEmbed.astro' import PinterestEmbed from './PinterestEmbed.astro' +import CodePenEmbed from './CodePenEmbed.astro' export interface Props { block: interfaces.Block @@ -37,6 +39,8 @@ try {