1
+ import { themes as prismThemes } from 'prism-react-renderer' ;
2
+ import type { Config } from '@docusaurus/types' ;
3
+ import type * as Preset from '@docusaurus/preset-classic' ;
4
+
5
+ import versions from './versions.json' ;
6
+
7
+ const lastStableVersion = versions . find ( ( version ) => version !== 'beta' )
8
+
9
+ const defaultLocale = 'fr'
10
+
11
+ export default async function createConfigAsync ( ) {
12
+ return {
13
+ title : 'RaidProtect' ,
14
+ tagline : 'Sécurisez votre serveur Discord' ,
15
+ favicon : 'img/favicon.ico' ,
16
+ url : 'https:/docs.raidprotect.bot' ,
17
+ baseUrl : '/' ,
18
+ organizationName : 'rapidprotect' ,
19
+ projectName : 'raidprotect' ,
20
+ onBrokenLinks : 'throw' ,
21
+ onBrokenMarkdownLinks : 'warn' ,
22
+ i18n : {
23
+ defaultLocale : defaultLocale ,
24
+ locales : [ 'fr' , 'en' ] ,
25
+ localeConfigs : {
26
+ fr : {
27
+ label : 'Français' ,
28
+ path : 'fr' ,
29
+ } ,
30
+ en : {
31
+ label : 'English' ,
32
+ path : 'en'
33
+ } ,
34
+ } ,
35
+ } ,
36
+ presets : [
37
+ [
38
+ 'classic' ,
39
+ {
40
+ docs : {
41
+ routeBasePath : '/' ,
42
+ sidebarPath : './sidebars.ts' ,
43
+ editUrl : 'https://github.com/raidprotect/docs/tree/main/' ,
44
+ lastVersion : lastStableVersion ,
45
+ onlyIncludeVersions : ( ( ) => {
46
+ return [ 'current' , lastStableVersion ] ;
47
+ } ) ( ) ,
48
+ versions : {
49
+ current : {
50
+ label : 'Bêta 🚧' ,
51
+ path : 'beta'
52
+ } ,
53
+ [ lastStableVersion ] : {
54
+ label : 'Stable' ,
55
+ }
56
+ } ,
57
+ admonitions : {
58
+ keywords : [ 'note' , 'tip' , 'info' , 'warning' , 'danger' ] ,
59
+ extendDefaults : true
60
+ } ,
61
+ breadcrumbs : true ,
62
+ sidebarCollapsible : false ,
63
+ sidebarCollapsed : false ,
64
+ editCurrentVersion : false ,
65
+ editLocalizedFiles : true ,
66
+ showLastUpdateAuthor : false ,
67
+ showLastUpdateTime : true ,
68
+ } ,
69
+ blog : false ,
70
+ pages : false ,
71
+ theme : {
72
+ customCss : './src/css/custom.css' ,
73
+ } ,
74
+ } satisfies Preset . Options ,
75
+ ] ,
76
+ ] ,
77
+ themeConfig : {
78
+ docs : {
79
+ versionPersistence : 'localStorage' ,
80
+ } ,
81
+ colorMode : {
82
+ defaultMode : 'dark' ,
83
+ respectPrefersColorScheme : true
84
+ } ,
85
+ image : 'img/docusaurus-social-card.jpg' ,
86
+ navbar : {
87
+ title : 'RaidProtect' ,
88
+ logo : {
89
+ alt : 'RaidProtect' ,
90
+ src : 'img/logo.svg' ,
91
+ href : 'https://raidprotect.bot' ,
92
+ target : '_self'
93
+ } ,
94
+ items : [
95
+ {
96
+ type : 'docSidebar' ,
97
+ sidebarId : 'sidebar' ,
98
+ position : 'left' ,
99
+ label : 'Documentation' ,
100
+ } ,
101
+ {
102
+ to : 'https://suggestions.raidprotect.bot' ,
103
+ position : 'left' ,
104
+ label : 'Suggestions' ,
105
+ target : '_self'
106
+ } ,
107
+ {
108
+ type : 'docsVersionDropdown' ,
109
+ position : 'right' ,
110
+ dropdownActiveClassDisabled : true ,
111
+ // dropdownItemsAfter: [
112
+ // {
113
+ // type: 'html',
114
+ // value: '<hr class="dropdown-separator">',
115
+ // },
116
+ // {
117
+ // to: '/versions',
118
+ // label: 'All versions',
119
+ // },
120
+ // ],
121
+ } ,
122
+ {
123
+ type : 'localeDropdown' ,
124
+ position : 'right' ,
125
+ // dropdownItemsAfter: [
126
+ // {
127
+ // type: 'html',
128
+ // value: '<hr style="margin: 0.3rem 0;">',
129
+ // },
130
+ // {
131
+ // href: 'https://github.com/facebook/docusaurus/issues/3526',
132
+ // label: 'Help Us Translate',
133
+ // },
134
+ // ],
135
+ } ,
136
+ ] ,
137
+ } ,
138
+ footer : {
139
+ style : 'light' ,
140
+ links : [ ] ,
141
+ logo : {
142
+ alt : 'RaidProtect' ,
143
+ src : 'img/logo.svg' ,
144
+ href : 'https://raidprotect.bot' ,
145
+ target : '_self' ,
146
+ width : '75px'
147
+ } ,
148
+ copyright : `Copyright © ${ new Date ( ) . getFullYear ( ) } RaidProtect` ,
149
+ } ,
150
+ prism : {
151
+ theme : prismThemes . github ,
152
+ darkTheme : prismThemes . dracula ,
153
+ } ,
154
+ } satisfies Preset . ThemeConfig ,
155
+ } satisfies Config
156
+ }
0 commit comments