From 255dfae985509b92e3e5570856e2981d4e9ecea0 Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Wed, 24 Apr 2024 13:50:06 +0200 Subject: [PATCH] feat: expose docs file in storybook --- .storybook/main.ts | 2 +- .storybook/preview.ts | 10 +--------- README.md | 4 ++-- docs/{GETTING_STARTED.md => GETTING_STARTED.mdx} | 4 ++++ docs/{VISION.md => VISION.mdx} | 4 ++++ 5 files changed, 12 insertions(+), 12 deletions(-) rename docs/{GETTING_STARTED.md => GETTING_STARTED.mdx} (98%) rename docs/{VISION.md => VISION.mdx} (97%) diff --git a/.storybook/main.ts b/.storybook/main.ts index 3def8b8f00..9de6030e58 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -2,7 +2,7 @@ import type { StorybookConfig } from '@storybook/web-components-vite'; import { type BuildOptions, type UserConfig, mergeConfig } from 'vite'; const config: StorybookConfig = { - stories: ['../src/**/*.stories.ts'], + stories: ['../docs/**/*.mdx', '../src/**/*.stories.ts'], addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-interactions'], framework: { name: '@storybook/web-components-vite', diff --git a/.storybook/preview.ts b/.storybook/preview.ts index 6a1becce36..a64407f0a4 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.ts @@ -65,15 +65,7 @@ export const parameters = { storySort: { // Story section order. // https://storybook.js.org/docs/react/writing-stories/naming-components-and-hierarchy#sorting-stories - order: [ - 'pages', - ['home', 'home personalized'], - 'components', - ['*', 'form elements', 'cards', 'layout'], - 'styles', - 'timetable', - 'internals', - ], + order: ['Introduction', 'Pages', 'Components', 'Styles', 'Timetable', 'Internals'], }, }, }; diff --git a/README.md b/README.md index 507cea4f10..c6d959043c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## 🎯 Our aim -To fulfill our [Vision](./docs/VISION.md), we are building and maintaining Lyne, our Design System, which is and acts +To fulfill our [Vision](./docs/VISION.mdx), we are building and maintaining Lyne, our Design System, which is and acts as our common language — our Single Source of Truth. For this purpose we use [Design Tokens](https://github.com/lyne-design-system/lyne-design-tokens) as our design abstractions. Those [Design Tokens](https://github.com/lyne-design-system/lyne-design-tokens) are consumed by Lyne Components and are integrated within our documentation. @@ -18,7 +18,7 @@ Lyne Design Tokens and Lyne Components are available for developers and designer - General docs: [digital.sbb.ch](https://digital.sbb.ch) - Component docs: [Storybook](https://lyne-storybook.app.sbb.ch) -- [Getting started guide](./docs/GETTING_STARTED.md) +- [Getting started guide](./docs/GETTING_STARTED.mdx) ## 🔗 Packages diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.mdx similarity index 98% rename from docs/GETTING_STARTED.md rename to docs/GETTING_STARTED.mdx index 82eaff0a9a..c18e78aa10 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.mdx @@ -1,3 +1,7 @@ +import { Meta } from '@storybook/blocks'; + + + # Getting Started Basic steps to integrate the lyne components into your project. diff --git a/docs/VISION.md b/docs/VISION.mdx similarity index 97% rename from docs/VISION.md rename to docs/VISION.mdx index f7b9d26582..213ed267df 100644 --- a/docs/VISION.md +++ b/docs/VISION.mdx @@ -1,3 +1,7 @@ +import { Meta } from '@storybook/blocks'; + + + # Lyne Design System — Vision ## What _Lyne_ is and why we need it