UNPKG

@hv/celestial

Version:

A styleguide for documenting your Astro-components

16 lines 582 B
import path from "node:path"; import { STYLEGUIDE_LAYOUT_DIR } from "../../helpers/constants.js"; export function generateStoryPage(config) { const layoutPath = path.join(STYLEGUIDE_LAYOUT_DIR, `LayoutInner.astro`); const relativeLayoutPath = path.relative(config.path, layoutPath); const relativeStoryPath = path.relative(config.path, config.componentPath); return; `--- import Layout from '${relativeLayoutPath}'; import Page from '${relativeStoryPath}'; --- <Layout title="${config.name}"> <Page /> </Layout>`; } //# sourceMappingURL=generateStoryPage.js.map