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

Fix/GitHub pages #1097

Merged
merged 4 commits into from
Oct 16, 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
4 changes: 2 additions & 2 deletions docs/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/static/meta/favicon.ico" />
<link rel="icon" href="/vkui-tokens/static/meta/favicon.ico" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Webpack React description" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
/>
<link rel="apple-touch-icon" href="/static/meta/apple-touch-icon.png" />
<link rel="apple-touch-icon" href="/vkui-tokens/static/meta/apple-touch-icon.png" />
<title>VKUI Tokens documentation</title>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ const articles = [

const router = createBrowserRouter([
{
path: "/",
path: "/vkui-tokens",
element: <Tokens />,
},
{
path: "/articles",
path: "/vkui-tokens/articles",
element: <Articles items={articles} />
},
...articles
.filter((article) => !!article.slug)
.map((article) => (
{
path: `/articles/${article.slug}`,
path: `/vkui-tokens/articles/${article.slug}`,
element: <Articles items={articles} contentsHtml={article.contents}/>
}
)),
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/layouts/shared/AsideMenu/AsideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function AsideMenu(props: AsideMenuProps) {
if (item.slug) {
return (
<div className="aside-menu-item" key={item.title}>
<Link to={`/articles/${item.slug}`}>{item.title}</Link>
<Link to={`/vkui-tokens/articles/${item.slug}`}>{item.title}</Link>
</div>
);
} else {
Expand All @@ -41,7 +41,7 @@ export function AsideMenu(props: AsideMenuProps) {
})}

<Spacing size={32}/>
<Link to="/">← К таблице токенов</Link>
<Link to="/vkui-tokens">← К таблице токенов</Link>
</Card>
</aside>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/pages/Tokens/TokensHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TokensHeader: FC = () => {
</div>
<div className="flex items-center" style={styles.linkContainer}>
<Icon16HelpOutline style={{ color: '#99A2AD', marginRight: 6 }}/>
<RouterLink to="/articles/new-theme" style={{textDecoration: 'none'}}>
<RouterLink to="/vkui-tokens/articles/new-theme" style={{textDecoration: 'none'}}>
<Link>
Документация
</Link>
Expand Down
8 changes: 8 additions & 0 deletions docs/webpack/webpack.client.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default function (env, argv) {
}),
new HtmlWebpackPlugin({
template: './public/index.html',
publicPath: '/vkui-tokens/'
}),
new WebpackNotifierPlugin({ alwaysNotify: false }),
new CopyWebpackPlugin({
Expand All @@ -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" },
},
]
},
};
};
Loading