-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.ts
115 lines (96 loc) · 2.94 KB
/
docusaurus.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import Navbar from "./src/configs/navbar";
import { LaravelLikePackageConfig, TelegramGitNotifierPackageConfig } from "./pluginConfigs";
import { RepoDocsStatic } from "./src/configs/staticDirectories";
import PrismConfig from "./src/configs/prism";
import AlgoliaConfig from "./src/configs/algolia";
require('dotenv').config();
const config: Config = {
title: process.env.BASE_NAME || 'CSlant Docs',
tagline: 'CSlant Documentation offers detailed guidelines and resources to help developers seamlessly utilize CSlant\'s convenient tools and features within your projects.',
favicon: 'img/favicon.ico',
trailingSlash: false, // This is to remove trailing slash from the URL
url: process.env.DOCS_URL || 'https://docs.cslant.com',
baseUrl: process.env.BASE_URL || '/',
organizationName: process.env.ORGANIZATION_NAME,
projectName: process.env.PROJECT_NAME,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
markdown: {
mermaid: true,
},
staticDirectories: [...RepoDocsStatic, 'static'] as Config['staticDirectories'],
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './src/configs/sidebars.ts',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
image: 'img/cslant-logo-horizontal.png',
navbar: Navbar as Preset.ThemeConfig['navbar'],
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: false,
},
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} <a href="https://cslant.com" target="_blank" rel="noopener noreferrer">CSlant</a>`,
},
theme: {
customCss: require.resolve('./repos/telegram-git-notifier-docs/assets/styles/styles.scss'),
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
liveCodeBlock: {
playgroundPosition: 'bottom',
},
prism: PrismConfig,
algolia: AlgoliaConfig,
} satisfies Preset.ThemeConfig,
plugins: [
[
'@docusaurus/plugin-content-docs',
TelegramGitNotifierPackageConfig,
],
[
'@docusaurus/plugin-content-docs',
LaravelLikePackageConfig,
],
[
'@docusaurus/plugin-google-gtag',
{
trackingID: process.env.GOOGLE_ANALYTICS_ID,
anonymizeIP: true,
},
],
['docusaurus-plugin-sass', {}]
],
baseUrlIssueBanner: false,
scripts: [
{
src: 'https://static.cloudflareinsights.com/beacon.min.js',
async: true,
'data-cf-beacon': `{"token": "${process.env.CLOUDFLARE_ANALYTICS_TOKEN}"}`,
},
],
themes: ['@docusaurus/theme-mermaid', '@docusaurus/theme-live-codeblock'],
};
export default config;