diff --git a/lib/remark/plugins.ts b/lib/remark/plugins.ts index af01558..47a6297 100644 --- a/lib/remark/plugins.ts +++ b/lib/remark/plugins.ts @@ -3,6 +3,7 @@ import remarkWikiLink from '@portaljs/remark-wiki-link' import remarkLastModified from './last-modified' import remarkRemoveTags from './remove-tags' +import remarkYouTubeEmbedFromImageLink from './youtube-embed-from-image-link' export default [ remarkLastModified, @@ -17,4 +18,5 @@ export default [ wikiLinkResolver: (slug: string): string[] => [`${slug}/`], // expects all pages to have root-level paths }, ], + remarkYouTubeEmbedFromImageLink, ] diff --git a/lib/remark/youtube-embed-from-image-link.ts b/lib/remark/youtube-embed-from-image-link.ts new file mode 100644 index 0000000..27f23f4 --- /dev/null +++ b/lib/remark/youtube-embed-from-image-link.ts @@ -0,0 +1,40 @@ +// Obsidian uses ![](