mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
Test relative assets for storybook (#1219)
This commit is contained in:
parent
437e4e8c6e
commit
ed8d3c179c
2
.github/workflows/deploy-docsite.yml
vendored
2
.github/workflows/deploy-docsite.yml
vendored
@ -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
|
||||
|
@ -40,15 +40,13 @@ const config: StorybookConfig = {
|
||||
staticDirs: [{ from: "../assets", to: "/assets" }],
|
||||
managerHead: (head) => `
|
||||
${head}
|
||||
<link rel="shortcut icon" href="/assets/waveterm-logo-with-bg.ico" />
|
||||
<link rel="icon" type="image/png" href="/assets/waveterm-logo-with-bg.png" sizes="250x250" />
|
||||
<link rel="shortcut icon" href="./assets/waveterm-logo-with-bg.ico" />
|
||||
<link rel="icon" type="image/png" href="./assets/waveterm-logo-with-bg.png" sizes="250x250" />
|
||||
<style>
|
||||
.sidebar-header img {
|
||||
max-width: 150px !important;
|
||||
max-height: 100px !important;
|
||||
}
|
||||
</style>
|
||||
<base href="${process.env.IS_OFFICIAL ? "/storybook" : "/"}" />
|
||||
`,
|
||||
</style>`,
|
||||
};
|
||||
export default config;
|
||||
|
@ -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",
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user