1
1
const lightCodeTheme = require ( 'prism-react-renderer/themes/github' ) ;
2
2
const darkCodeTheme = require ( 'prism-react-renderer/themes/dracula' ) ;
3
3
4
+ // With JSDoc @type annotations, IDEs can provide config autocompletion
4
5
/** @type {import('@docusaurus/types').DocusaurusConfig } */
5
- module . exports = {
6
+ ( module . exports = {
6
7
title : 'My Site' ,
7
8
tagline : 'Dinosaurs are cool' ,
8
9
url : 'https://your-docusaurus-test-site.com' ,
@@ -12,82 +13,12 @@ module.exports = {
12
13
favicon : 'img/favicon.ico' ,
13
14
organizationName : 'facebook' , // Usually your GitHub org/user name.
14
15
projectName : 'docusaurus' , // Usually your repo name.
15
- themeConfig : {
16
- navbar : {
17
- title : 'My Site' ,
18
- logo : {
19
- alt : 'My Site Logo' ,
20
- src : 'img/logo.svg' ,
21
- } ,
22
- items : [
23
- {
24
- type : 'doc' ,
25
- docId : 'intro' ,
26
- position : 'left' ,
27
- label : 'Tutorial' ,
28
- } ,
29
- { to : '/blog' , label : 'Blog' , position : 'left' } ,
30
- {
31
- href : 'https://github.com/facebook/docusaurus' ,
32
- label : 'GitHub' ,
33
- position : 'right' ,
34
- } ,
35
- ] ,
36
- } ,
37
- footer : {
38
- style : 'dark' ,
39
- links : [
40
- {
41
- title : 'Docs' ,
42
- items : [
43
- {
44
- label : 'Tutorial' ,
45
- to : '/docs/intro' ,
46
- } ,
47
- ] ,
48
- } ,
49
- {
50
- title : 'Community' ,
51
- items : [
52
- {
53
- label : 'Stack Overflow' ,
54
- href : 'https://stackoverflow.com/questions/tagged/docusaurus' ,
55
- } ,
56
- {
57
- label : 'Discord' ,
58
- href : 'https://discordapp.com/invite/docusaurus' ,
59
- } ,
60
- {
61
- label : 'Twitter' ,
62
- href : 'https://twitter.com/docusaurus' ,
63
- } ,
64
- ] ,
65
- } ,
66
- {
67
- title : 'More' ,
68
- items : [
69
- {
70
- label : 'Blog' ,
71
- to : '/blog' ,
72
- } ,
73
- {
74
- label : 'GitHub' ,
75
- href : 'https://github.com/facebook/docusaurus' ,
76
- } ,
77
- ] ,
78
- } ,
79
- ] ,
80
- copyright : `Copyright © ${ new Date ( ) . getFullYear ( ) } My Project, Inc. Built with Docusaurus.` ,
81
- } ,
82
- prism : {
83
- theme : lightCodeTheme ,
84
- darkTheme : darkCodeTheme ,
85
- } ,
86
- } ,
16
+
87
17
presets : [
88
18
[
89
19
'@docusaurus/preset-classic' ,
90
- {
20
+ /** @type {import('@docusaurus/preset-classic').Options } */
21
+ ( {
91
22
docs : {
92
23
sidebarPath : require . resolve ( './sidebars.js' ) ,
93
24
// Please change this to your repo.
@@ -102,7 +33,82 @@ module.exports = {
102
33
theme : {
103
34
customCss : require . resolve ( './src/css/custom.css' ) ,
104
35
} ,
105
- } ,
36
+ } ) ,
106
37
] ,
107
38
] ,
108
- } ;
39
+
40
+ themeConfig :
41
+ /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
42
+ ( {
43
+ navbar : {
44
+ title : 'My Site' ,
45
+ logo : {
46
+ alt : 'My Site Logo' ,
47
+ src : 'img/logo.svg' ,
48
+ } ,
49
+ items : [
50
+ {
51
+ type : 'doc' ,
52
+ docId : 'intro' ,
53
+ position : 'left' ,
54
+ label : 'Tutorial' ,
55
+ } ,
56
+ { to : '/blog' , label : 'Blog' , position : 'left' } ,
57
+ {
58
+ href : 'https://github.com/facebook/docusaurus' ,
59
+ label : 'GitHub' ,
60
+ position : 'right' ,
61
+ } ,
62
+ ] ,
63
+ } ,
64
+ footer : {
65
+ style : 'dark' ,
66
+ links : [
67
+ {
68
+ title : 'Docs' ,
69
+ items : [
70
+ {
71
+ label : 'Tutorial' ,
72
+ to : '/docs/intro' ,
73
+ } ,
74
+ ] ,
75
+ } ,
76
+ {
77
+ title : 'Community' ,
78
+ items : [
79
+ {
80
+ label : 'Stack Overflow' ,
81
+ href : 'https://stackoverflow.com/questions/tagged/docusaurus' ,
82
+ } ,
83
+ {
84
+ label : 'Discord' ,
85
+ href : 'https://discordapp.com/invite/docusaurus' ,
86
+ } ,
87
+ {
88
+ label : 'Twitter' ,
89
+ href : 'https://twitter.com/docusaurus' ,
90
+ } ,
91
+ ] ,
92
+ } ,
93
+ {
94
+ title : 'More' ,
95
+ items : [
96
+ {
97
+ label : 'Blog' ,
98
+ to : '/blog' ,
99
+ } ,
100
+ {
101
+ label : 'GitHub' ,
102
+ href : 'https://github.com/facebook/docusaurus' ,
103
+ } ,
104
+ ] ,
105
+ } ,
106
+ ] ,
107
+ copyright : `Copyright © ${ new Date ( ) . getFullYear ( ) } My Project, Inc. Built with Docusaurus.` ,
108
+ } ,
109
+ prism : {
110
+ theme : lightCodeTheme ,
111
+ darkTheme : darkCodeTheme ,
112
+ } ,
113
+ } ) ,
114
+ } ) ;
0 commit comments