diff --git a/src/pages/components/[...path].astro b/src/pages/components/[...path].astro index 10670aad9..5a5da1249 100644 --- a/src/pages/components/[...path].astro +++ b/src/pages/components/[...path].astro @@ -19,12 +19,15 @@ if (!entry) { } const { remarkPluginFrontmatter } = await render(entry); -const importPath = `${remarkPluginFrontmatter.mdjsStoriesPath}`; +const loadDemoAttributes = {}; +if (remarkPluginFrontmatter.mdjsStoriesPath) { + loadDemoAttributes['data-import-path'] = remarkPluginFrontmatter.mdjsStoriesPath; +} --- - +