docuservix/widgets/chat: добавлен компонент чата #6
@@ -6,6 +6,8 @@ import type { Config } from '@docusaurus/types';
|
|||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import { themes as prismThemes } from 'prism-react-renderer';
|
import { themes as prismThemes } from 'prism-react-renderer';
|
||||||
|
|
||||||
|
import docuservix from './plugins/docuservix';
|
||||||
|
|
||||||
interface DocsConfig {
|
interface DocsConfig {
|
||||||
title: string;
|
title: string;
|
||||||
project: { org: string; repo: string };
|
project: { org: string; repo: string };
|
||||||
@@ -33,6 +35,7 @@ const config: Config = {
|
|||||||
markdown: {
|
markdown: {
|
||||||
mermaid: true,
|
mermaid: true,
|
||||||
},
|
},
|
||||||
|
plugins: [docuservix()],
|
||||||
themes: ['@docusaurus/theme-mermaid'],
|
themes: ['@docusaurus/theme-mermaid'],
|
||||||
|
|
||||||
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
|
// 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",
|
"extends": "@docusaurus/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@docuservix/*": [
|
||||||
|
"plugins/docuservix/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
"ignoreDeprecations": "6.0",
|
"ignoreDeprecations": "6.0",
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user