From 02ca582ea71a862126862e9acaf71ab1dcf2429f Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 6 Nov 2024 11:56:32 -0800 Subject: [PATCH] Test relative assets for storybook --- .github/workflows/deploy-docsite.yml | 2 +- .storybook/main.ts | 8 +++----- .storybook/theme.ts | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-docsite.yml b/.github/workflows/deploy-docsite.yml index 0a38973593..72c6973c08 100644 --- a/.github/workflows/deploy-docsite.yml +++ b/.github/workflows/deploy-docsite.yml @@ -41,7 +41,7 @@ jobs: working-directory: docs/ - name: Build Storybook - run: IS_OFFICIAL=1 yarn build-storybook + run: yarn build-storybook # Copy the storybook static site into the docsite output and copy the assets from the main repo into the assets dir of the docsite output. # It needs to be in assets/assets because assets/ gets served from the / root of the site and storybook expects to find assets in /assets/ - name: Copy Storybook to docs diff --git a/.storybook/main.ts b/.storybook/main.ts index 68810e004f..ca1080277c 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -40,15 +40,13 @@ const config: StorybookConfig = { staticDirs: [{ from: "../assets", to: "/assets" }], managerHead: (head) => ` ${head} - - + + - -`, + `, }; export default config; diff --git a/.storybook/theme.ts b/.storybook/theme.ts index bba9f65d51..aa4f4b4cab 100644 --- a/.storybook/theme.ts +++ b/.storybook/theme.ts @@ -4,7 +4,7 @@ export const light = create({ base: "light", brandTitle: "Wave Terminal Storybook", brandUrl: "https://docs.waveterm.dev/storybook/", - brandImage: "/assets/wave-light.png", + brandImage: "./assets/wave-light.png", brandTarget: "_self", }); @@ -12,6 +12,6 @@ export const dark = create({ base: "dark", brandTitle: "Wave Terminal Storybook", brandUrl: "https://docs.waveterm.dev/storybook/", - brandImage: "/assets/wave-dark.png", + brandImage: "./assets/wave-dark.png", brandTarget: "_self", });