docuservix/pages: добавление пустой страницы чата

This commit is contained in:
2026-06-17 18:23:19 +03:00
parent cacdf23c87
commit bd4dfe7bc5
5 changed files with 52 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import path from 'path';
import type { LoadContext, Plugin } from '@docusaurus/types';
function pluginDocuservix(_context: LoadContext): Plugin {
return {
name: 'docuservix',
configureWebpack() {
return {
resolve: {
alias: {
'@docuservix': path.resolve(__dirname),
},
},
};
},
async contentLoaded({ actions }) {
const { addRoute } = actions;
addRoute({
path: '/chat',
component: '@docuservix/pages/chat',
exact: true,
});
},
};
}
export default pluginDocuservix;
@@ -0,0 +1,10 @@
import Layout from '@theme/Layout';
import { ReactNode } from 'react';
export function ChatPage(): ReactNode {
return (
<Layout title="Чат">
<main className="container margin-vert--lg">Hello world!</main>
</Layout>
);
}
+3
View File
@@ -0,0 +1,3 @@
import { ChatPage } from './ChatPage';
export default ChatPage;