-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.cjs
More file actions
136 lines (123 loc) · 4.08 KB
/
docusaurus.config.cjs
File metadata and controls
136 lines (123 loc) · 4.08 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
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
// @ts-check
/** @type {import('@docusaurus/types').Config} */
const config = {
staticDirectories: ['assets'],
title: 'Defra Interactive Map',
tagline: 'An accessibility-first interactive map component for government frontends',
favicon: 'images/favicon.svg',
url: 'https://defra.github.io',
baseUrl: '/interactive-map/',
organizationName: 'defra',
projectName: 'interactive-map',
deploymentBranch: 'main',
trailingSlash: false,
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [],
themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
// docs-only mode: routeBasePath is '/'
docsRouteBasePath: '/',
indexBlog: false,
indexPages: false,
// hashed filenames for long-term caching of the search index
hashed: 'filename',
highlightSearchTermsOnTargetPage: true,
searchResultContextMaxLength: 60,
}),
],
'@defra/docusaurus-theme-govuk',
],
plugins: [
function customCssPlugin() {
return {
name: 'custom-css',
getClientModules() {
return [require.resolve('./assets/css/docusaurus.css')];
},
};
},
[
'@docusaurus/plugin-content-docs',
{
routeBasePath: '/',
editUrl: 'https://github.com/DEFRA/interactive-map/tree/main/',
},
],
],
themeConfig: {
// Required by @docusaurus/plugin-content-docs when not using preset-classic.
// easyops SearchBarWrapper calls useThemeConfig().docs.versionPersistence
// during SSR; without this it throws "Cannot read properties of undefined".
docs: {
versionPersistence: 'localStorage',
},
govuk: {
header: {
serviceName: 'Interactive Map',
serviceHref: '/',
organisationText: 'Defra DDTS',
organisationHref: 'https://github.com/defra',
},
navigation: [
{
text: 'Getting Started',
href: '/getting-started',
sidebar: [
{ text: 'Installation', href: '/getting-started#installation' },
{ text: 'Basic usage', href: '/getting-started#basic-usage' },
{ text: 'Using plugins', href: '/getting-started#using-plugins' },
{ text: 'GOV.UK Prototype kit', href: '/getting-started#govuk-prototype-kit-plugin' }
],
},
{ text: 'Examples', href: '/examples', sidebar: 'auto' },
{
text: 'API',
href: '/api',
sidebar: 'auto',
},
{
text: 'Plugins',
href: '/plugins',
sidebar: [
// { text: 'Overview', href: '/plugins' },
// { text: 'Building a Plugin', href: '/building-a-plugin' },
{ text: 'Available Plugins', href: '/plugins#available-plugins' },
{ text: 'Coming soon', href: '/plugins#coming-soon' },
{ text: 'Using plugins', href: '/plugins#using-plugins' },
{ text: 'Plugin events', href: '/plugins#plugin-events' },
{ text: 'Plugin methods', href: '/plugins#plugin-methods' },
{ text: 'Further reading', href: '/plugins#further-reading' },
],
},
{
text: 'Architecture',
href: '/architecture',
sidebar: [
{ text: 'Diagrams', href: 'architecture-diagrams' },
{ text: 'Diagram Viewer', href: 'diagrams-viewer' },
],
}
],
phaseBanner: {
phase: 'alpha',
text: 'This is a new frontend component. Help us improve it and give your feedback on Slack.',
},
footer: {
meta: [
{ text: 'GitHub', href: 'https://github.com/DEFRA/interactive-map' },
],
},
homepage: {
getStartedHref: '/getting-started',
description: 'Built for developers creating public-facing services on GOV.UK. Takes care of the hard work of building an accessible, standards-compliant mapping interface, so you can focus on your data.',
},
},
},
};
module.exports = config;