-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
105 lines (95 loc) · 3.55 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
105 lines (95 loc) · 3.55 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
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
// @ts-check
// Docusaurus config for the High Performance Python study-drills docs site.
//
// Docs-only mode: the docs plugin owns the site root ("/"), there is no blog and no separate
// marketing homepage. All pages under docs/ are GENERATED by sync-docs.mjs from the repo's
// chapter_*/ folders + website/content/ — never edit docs/ by hand (npm run sync rewrites it).
import {themes as prismThemes} from 'prism-react-renderer';
const GITHUB_REPO = 'https://github.com/deepanshululla/high-performance-python';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'High Performance Python — Study Drills',
tagline: 'Runnable, measured practice exercises for High Performance Python (3rd ed.)',
// --- Hosting ---------------------------------------------------------------
// Portable defaults for local dev and a static build (website/build/) you can drop on any
// host. To publish later (e.g. GitHub Pages at deepanshululla.github.io/high-performance-
// python/), set: url: 'https://deepanshululla.github.io', baseUrl: '/high-performance-
// python/', organizationName: 'deepanshululla', projectName: 'high-performance-python'.
url: 'http://localhost',
baseUrl: '/',
onBrokenLinks: 'throw',
// Render .md as CommonMark (not MDX) so the prose's bare `<`, `{`, and `[:]` in code spans
// pass through untouched. .mdx files (none here) would still be MDX.
markdown: {
format: 'md',
hooks: {onBrokenMarkdownLinks: 'warn'},
},
i18n: {defaultLocale: 'en', locales: ['en']},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
routeBasePath: '/', // docs at the site root
sidebarPath: './sidebars.js',
editUrl: undefined, // generated content — no "edit this page"
},
blog: false,
theme: {customCss: './src/css/custom.css'},
}),
],
],
themes: [
[
'@easyops-cn/docusaurus-search-local',
/** @type {import('@easyops-cn/docusaurus-search-local').PluginOptions} */
({
hashed: true,
indexDocs: true,
indexBlog: false,
docsRouteBasePath: '/',
highlightSearchTermsOnTargetPage: true,
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {defaultMode: 'light', respectPrefersColorScheme: true},
navbar: {
title: 'HPP Study Drills',
items: [
{type: 'docSidebar', sidebarId: 'docs', position: 'left', label: 'Docs'},
{to: '/glossary', label: 'Glossary', position: 'left'},
{href: GITHUB_REPO, label: 'GitHub', position: 'right'},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{label: 'Intro', to: '/'},
{label: 'Getting started', to: '/getting-started'},
{label: 'Conventions', to: '/conventions'},
{label: 'Glossary', to: '/glossary'},
],
},
{title: 'Repo', items: [{label: 'GitHub', href: GITHUB_REPO}]},
],
copyright:
'Study notes for High Performance Python, 3rd ed. (Gorelick & Ozsvald, O’Reilly).',
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
'python', 'rust', 'c', 'cpp', 'fortran', 'toml', 'bash', 'json', 'ini', 'docker',
],
},
}),
};
export default config;