Skip to content

Commit 716451a

Browse files
committed
chore: test
1 parent 6697527 commit 716451a

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

apps/public-docsite-v9/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"private": true,
55
"description": "Fluent UI React v9 documentation",
66
"scripts": {
7-
"build-storybook": "cross-env NODE_OPTIONS=--max_old_space_size=3072 DEPLOY_PATH=/react/ storybook build -o ./dist/react --docs",
8-
"postbuild-storybook": "yarn rewrite-title",
7+
"build-storybook": "cross-env NODE_OPTIONS=--max_old_space_size=3072 storybook build -o ./dist/react --docs",
8+
"postbuild-storybook": "yarn rewrite-title && yarn inject-redirect",
99
"rewrite-title": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/rewrite-title.ts --title 'Fluent UI React v9' --distPath ./dist/react",
10-
"inject-redirect": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/inject-redirect.ts --distPath ./dist/ --redirectUrl https://mainframev.github.io/fluentui/react",
10+
"inject-redirect": "node -r ../../scripts/ts-node/src/register ../../scripts/storybook/src/scripts/inject-redirect.ts --distPath ./dist/ --redirectUrl https://mainframev.github.io/fluentui/react/index.html",
1111
"generate-llms-docs": "yarn storybook-llms-extractor --config storybook-llms.config.js",
1212
"clean": "just-scripts clean",
1313
"code-style": "just-scripts code-style",

apps/public-docsite-v9/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"executor": "nx:noop",
1010
"dependsOn": [
1111
"build-storybook",
12-
"inject-redirect",
1312
{
1413
"projects": ["chart-docsite", "web-components"],
1514
"target": "build-storybook:docsite"

scripts/storybook/src/scripts/inject-redirect.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,21 @@ function processArgs(): { distPath: string; redirectUrl: string } {
4545

4646
function injectRedirect(filePath: string, url: string) {
4747
const content = dedent`
48-
<!DOCTYPE html>
49-
<html>
50-
<head>
51-
<meta http-equiv="refresh" content="0; url=${url}">
52-
<title>Redirecting...</title>
53-
</head>
54-
<body>
55-
<p>The has moved to <a href="${url}">${url}</a>. You will be automatically redirected.</p>
56-
</body>
57-
</html>
48+
<!DOCTYPE html>
49+
<html>
50+
<head>
51+
<meta charset="UTF-8">
52+
<title>Redirecting...</title>
53+
<script>
54+
var target = "${url}" + window.location.search + window.location.hash;
55+
window.location.replace(target);
56+
</script>
57+
</head>
58+
<body>
59+
<p>The page has moved to <a id="redirectLink" href="${url}">${url}</a>.
60+
You will be automatically redirected.</p>
61+
</body>
62+
</html>
5863
`;
5964

6065
writeFileSync(filePath, content, 'utf-8');

0 commit comments

Comments
 (0)