docuservix/pages: добавление пустой страницы чата
This commit is contained in:
@@ -6,6 +6,8 @@ import type { Config } from '@docusaurus/types';
|
||||
import yaml from 'js-yaml';
|
||||
import { themes as prismThemes } from 'prism-react-renderer';
|
||||
|
||||
import docuservix from './plugins/docuservix';
|
||||
|
||||
interface DocsConfig {
|
||||
title: string;
|
||||
project: { org: string; repo: string };
|
||||
@@ -33,6 +35,7 @@ const config: Config = {
|
||||
markdown: {
|
||||
mermaid: true,
|
||||
},
|
||||
plugins: [docuservix()],
|
||||
themes: ['@docusaurus/theme-mermaid'],
|
||||
|
||||
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import path from 'path';
|
||||
|
||||
import type { LoadContext, Plugin } from '@docusaurus/types';
|
||||
|
||||
export default function docuservix() {
|
||||
return 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,
|
||||
});
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { ChatPage } from './ChatPage';
|
||||
|
||||
export default ChatPage;
|
||||
@@ -5,6 +5,11 @@
|
||||
"extends": "@docusaurus/tsconfig",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@docuservix/*": [
|
||||
"plugins/docuservix/*"
|
||||
]
|
||||
},
|
||||
"ignoreDeprecations": "6.0",
|
||||
"strict": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user