Skip to content

Commit

Permalink
fix(storybook): move intro pages back to MDX
Browse files Browse the repository at this point in the history
  • Loading branch information
daneah committed Jul 18, 2024
1 parent 5fa288a commit 9c88f81
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 65 deletions.
6 changes: 0 additions & 6 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@ module.exports = {
singleQuote: true,
arrowParens: 'always',
bracketSpacing: true,
overrides: [
{
files: '*.mdx',
options: { parser: 'mdx' },
},
],
};
2 changes: 1 addition & 1 deletion .storybook/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const fullConfig: StorybookConfig = {
name: '@storybook/web-components-vite',
options: {},
},
stories: [...config.stories, '../../packages/pharos/**/*.docs.tsx'],
stories: [...config.stories, '../../packages/pharos/docs/**/*.docs.mdx'],
refs: (config, { configType }) => {
const isDevelopment = configType === 'DEVELOPMENT';
return {
Expand Down
6 changes: 3 additions & 3 deletions .storybook/react/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const fullConfig: StorybookConfig = {
stories: [
...config.stories,
{
directory: '../../packages/pharos',
files: '**/*.@(react|pages).stories.@(js|jsx|tsx)',
directory: '../../packages/pharos/docs',
files: '**/*.docs.mdx',
},
{
directory: '../../packages/pharos',
files: '**/*.docs.tsx',
files: '**/*.@(react|pages).stories.@(js|jsx|tsx)',
},
],
};
Expand Down
6 changes: 3 additions & 3 deletions .storybook/wc/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const fullConfig: StorybookConfig = {
stories: [
...config.stories,
{
directory: '../../packages/pharos',
files: '**/*.@(wc|pages).stories.@(js|jsx|ts)',
directory: '../../packages/pharos/docs',
files: '**/*.docs.mdx',
},
{
directory: '../../packages/pharos',
files: '**/*.docs.tsx',
files: '**/*.@(wc|pages).stories.@(js|jsx|ts)',
},
],
};
Expand Down
19 changes: 19 additions & 0 deletions packages/pharos/docs/1.intro.docs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Markdown, Meta } from '@storybook/blocks';

import Intro from '../README.md?raw';
import PHAROS_TITLE from '@config/pharosTitle';

<Meta title="Intro" />

export const Title = () => PHAROS_TITLE;

# <Title /> Web Components

<Markdown>{Intro}</Markdown>

## Work with us at ITHAKA

JSTOR is part of ITHAKA, a not-for-profit dedicated to expanding access to knowledge and education worldwide. Our staff makes us who we are. We’re hiring — join us!

- [See career opportunities](https://www.ithaka.org/careers/)
- [Learn more about ITHAKA](https://www.ithaka.org/)
38 changes: 0 additions & 38 deletions packages/pharos/docs/1.intro.docs.tsx

This file was deleted.

7 changes: 7 additions & 0 deletions packages/pharos/docs/2.changelog.docs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Markdown, Meta } from '@storybook/blocks';

import Changelog from '../CHANGELOG.md?raw';

<Meta title="Changelog" />

<Markdown>{Changelog}</Markdown>
14 changes: 0 additions & 14 deletions packages/pharos/docs/2.changelog.docs.tsx

This file was deleted.

0 comments on commit 9c88f81

Please sign in to comment.