From ca7e19e18b6eded8850c91496300812aa3d5cddf Mon Sep 17 00:00:00 2001 From: "s.peshkov" Date: Wed, 16 Oct 2024 16:03:16 +0300 Subject: [PATCH 1/3] fix/github-pages: fix github pages router --- docs/src/App.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/App.tsx b/docs/src/App.tsx index d18b3ec0..a8d3a5a2 100644 --- a/docs/src/App.tsx +++ b/docs/src/App.tsx @@ -35,18 +35,18 @@ const articles = [ const router = createBrowserRouter([ { - path: "/", + path: "/vkui-tokens", element: , }, { - path: "/articles", + path: "/vkui-tokens/articles", element: }, ...articles .filter((article) => !!article.slug) .map((article) => ( { - path: `/articles/${article.slug}`, + path: `/vkui-tokens/articles/${article.slug}`, element: } )), From b7cdaecb39c3e20a60540fda529943e0fede3452 Mon Sep 17 00:00:00 2001 From: "s.peshkov" Date: Wed, 16 Oct 2024 16:09:12 +0300 Subject: [PATCH 2/3] fix/github-pages: fix urls inside docs --- docs/src/components/layouts/shared/AsideMenu/AsideMenu.tsx | 4 ++-- docs/src/components/pages/Tokens/TokensHeader.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/components/layouts/shared/AsideMenu/AsideMenu.tsx b/docs/src/components/layouts/shared/AsideMenu/AsideMenu.tsx index eeb32d7c..f81f862b 100644 --- a/docs/src/components/layouts/shared/AsideMenu/AsideMenu.tsx +++ b/docs/src/components/layouts/shared/AsideMenu/AsideMenu.tsx @@ -26,7 +26,7 @@ export function AsideMenu(props: AsideMenuProps) { if (item.slug) { return (
- {item.title} + {item.title}
); } else { @@ -41,7 +41,7 @@ export function AsideMenu(props: AsideMenuProps) { })} - ← К таблице токенов + ← К таблице токенов ); diff --git a/docs/src/components/pages/Tokens/TokensHeader.tsx b/docs/src/components/pages/Tokens/TokensHeader.tsx index b5bd2476..38c04ff3 100644 --- a/docs/src/components/pages/Tokens/TokensHeader.tsx +++ b/docs/src/components/pages/Tokens/TokensHeader.tsx @@ -45,7 +45,7 @@ const TokensHeader: FC = () => {
- + Документация From 1bc67d189396fa6e18573c8e8ddb2ea1dd8f0c42 Mon Sep 17 00:00:00 2001 From: "s.peshkov" Date: Wed, 16 Oct 2024 18:20:36 +0300 Subject: [PATCH 3/3] fix/github-pages: fix paths --- docs/public/index.html | 4 ++-- docs/webpack/webpack.client.mjs | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/public/index.html b/docs/public/index.html index 104bb926..3aeedca2 100644 --- a/docs/public/index.html +++ b/docs/public/index.html @@ -2,14 +2,14 @@ - + - + VKUI Tokens documentation diff --git a/docs/webpack/webpack.client.mjs b/docs/webpack/webpack.client.mjs index 7fc5e6b4..3fd9ca96 100644 --- a/docs/webpack/webpack.client.mjs +++ b/docs/webpack/webpack.client.mjs @@ -60,6 +60,7 @@ export default function (env, argv) { }), new HtmlWebpackPlugin({ template: './public/index.html', + publicPath: '/vkui-tokens/' }), new WebpackNotifierPlugin({ alwaysNotify: false }), new CopyWebpackPlugin({ @@ -82,6 +83,13 @@ export default function (env, argv) { hot: true, open: true, historyApiFallback: true, + proxy: [ + { + context: ["/vkui-tokens/assets"], + target: "http://localhost:3000", + pathRewrite: { "^/vkui-tokens/(.*)": "/$1" }, + }, + ] }, }; };