-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
152 lines (146 loc) · 5.19 KB
/
docusaurus.config.js
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
const version = require('./version.json');
const revision = require('child_process')
.execSync('git rev-parse HEAD')
.toString().trim().substring(0,7)
const path = require('path')
let buildVersion = version.version.replace('{commit}', revision)
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Fábulas & Goblins',
tagline: 'Um sistema de RPG aberto, gratuíto e colaborativo.',
url: 'https://fabulas-e-goblins.netlify.app',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'renatodex', // Usually your GitHub org/user name.
projectName: 'fabulas-e-goblins', // Usually your repo name.
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/renatodex/fabulas-e-goblins/edit/master/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/renatodex/fabulas-e-goblins/edit/master/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Fábulas & Goblins',
logo: {
alt: 'Fábulas & Goblins',
src: 'img/logo-mini.png',
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: `Livro (v${buildVersion}-${version.phase})`,
position: 'left',
},
{
to: 'database/monsters/',
activeBasePath: 'database',
label: 'Bestiário',
position: 'left',
},
{
href: 'https://github.com/renatodex/fabulas-e-goblins',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Livro',
items: [
{
label: 'Começando a jogar',
to: '/docs/1-starting-the-game',
},
],
},
{
title: 'Comunidade',
items: [
{
label: 'Instagram',
href: 'https://instagram.com/tendadogoblin',
},
{
label: 'GitHub',
href: 'https://github.com/renatodex/fabulas-e-goblins',
},
],
},
{
title: 'Mais',
items: [
{
label: 'Blog',
to: 'blog',
},
],
},
],
copyright: `<p xmlns:dct="http://purl.org/dc/terms/" xmlns:cc="http://creativecommons.org/ns#" class="license-text"><a rel="cc:attributionURL" property="dct:title" href="https://www.fabulasegoblins.com.br">Fábulas & Goblins</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://www.instagram.com/tendadogoblin">Tenda do Goblin</a> is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0">CC BY-NC 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" /><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" /></a></p>`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
plugins: [
'docusaurus-plugin-sass',
'./plugins/spells-to-static',
'./plugins/enemies-to-static',
'./plugins/tables-to-static',
'./plugins/md-tables-to-static',
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
[
path.resolve(__dirname, './plugins/dynamic-routes'),
{ // this is the options object passed to the plugin
routes: [
{ // using Route schema from react-router
path: '/tabelas',
exact: false, // this is needed for sub-routes to match!
component: '/src/pages/tabelas/app.js'
}
]
}
],
]
};
module.exports = config;