Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add storybook static directory #618

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { promisify } = require('util')
const glob = promisify(require('glob'))
const { viteCommonjs } = require('@originjs/vite-plugin-commonjs')

/** @type {import('@storybook/react-vite').StorybookConfig}*/
module.exports = {
stories: [
'../packages/**/*.mdx',
Expand Down Expand Up @@ -114,6 +115,23 @@ module.exports = {
docs: {
autodocs: true,
},
staticDirs: ['./static'],
managerHead: (head) => `${head}
<title>Charcoal ドキュメント</title>
<meta
property="description"
content="ピクシブ株式会社のデザインシステム charcoal のドキュメントサイト"
/>
<meta property="og:url" content="" />
<meta property="og:title" content="charcoal"} />
<meta property="og:site_name" content="Charcoal ドキュメント" />
<meta
property="og:description"
content="ピクシブ株式会社のデザインシステム charcoal のドキュメントサイト"
/>
<meta property="og:type" content="website" />
<meta property="og:image" content="/charcoal-ogp.jpg" />
`,
}

const packagesDir = path.resolve(__dirname, '../packages')
Expand Down
2 changes: 1 addition & 1 deletion .storybook/src/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, Story } from '@storybook/addon-docs'

<Meta title="README" />

![charcoal logo](https://charcoal-web.pixiv.design/charcoal-ogp.jpg)
![charcoal logo](/charcoal-ogp.jpg)

# Charcoal

Expand Down
Binary file added .storybook/static/charcoal-ogp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading