forked from Nicxe/f1_sensor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
78 lines (66 loc) · 2.12 KB
/
docusaurus.config.js
File metadata and controls
78 lines (66 loc) · 2.12 KB
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
import {themes as prismThemes} from 'prism-react-renderer';
import {readFileSync} from 'fs';
import {fileURLToPath} from 'url';
import path from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const rootPackageJson = JSON.parse(
readFileSync(path.join(__dirname, 'package.json'), 'utf8')
);
const version = rootPackageJson.version;
const GITHUB_ORG_NAME = 'Nicxe';
const GITHUB_REPO_NAME = 'f1_sensor';
const GITHUB_REPO_URL = `https://github.com/${GITHUB_ORG_NAME}/${GITHUB_REPO_NAME}`;
const DOCS_FOLDER = 'docs';
const config = {
title: 'F1 Sensor',
tagline: 'Home Assistant F1 Sensor Integration',
favicon: 'img/favicon.ico',
future: { v4: true },
url: `https://${GITHUB_ORG_NAME}.github.io`,
baseUrl: `/${GITHUB_REPO_NAME}/`,
organizationName: GITHUB_ORG_NAME,
projectName: GITHUB_REPO_NAME,
trailingSlash: false,
onBrokenLinks: 'throw',
i18n: { defaultLocale: 'en', locales: ['en'] },
presets: [
[
'classic',
({
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.js',
editUrl: ({docPath}) =>
`${GITHUB_REPO_URL}/edit/main/${DOCS_FOLDER}/${docPath}`,
},
blog: false,
theme: { customCss: './src/css/custom.css' },
}),
],
],
themes: [
[
'@easyops-cn/docusaurus-search-local',
{ hashed: true, highlightSearchTermsOnTargetPage: true },
],
],
themeConfig: {
navbar: {
title: 'F1 Sensor',
logo: { alt: 'Logo?', src: 'img/logo.svg' },
items: [
{ html: `<span>v${version}</span>`, position: 'left', className: 'navbar-version-chip', href: '#' },
{ type: 'search', position: 'right' },
{ href: `${GITHUB_REPO_URL}`, label: 'GitHub', position: 'right' },
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} F1 Sensor. Built with Docusaurus.`,
},
colorMode: { defaultMode: 'light', disableSwitch: false, respectPrefersColorScheme: true },
prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula },
},
};
export default config;