-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocusaurus.config.cjs
More file actions
141 lines (128 loc) · 3.72 KB
/
docusaurus.config.cjs
File metadata and controls
141 lines (128 loc) · 3.72 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
137
138
139
140
141
// @ts-check
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Forms Engine Plugin',
tagline: 'A hapi plugin for building GOV.UK form journeys with minimal code',
favicon: undefined,
url: 'https://defra.github.io',
baseUrl: '/forms-engine-plugin/',
organizationName: 'defra',
projectName: 'forms-engine-plugin',
deploymentBranch: 'main',
trailingSlash: false,
i18n: {
defaultLocale: 'en',
locales: ['en']
},
presets: [],
themes: [
/** @type {any} */ ([
require.resolve('@easyops-cn/docusaurus-search-local'),
{
docsRouteBasePath: '/',
indexBlog: false,
indexPages: false,
hashed: 'filename',
highlightSearchTermsOnTargetPage: true,
searchResultContextMaxLength: 60
}
]),
'@defra/docusaurus-theme-govuk'
],
plugins: [
function customCssPlugin() {
return {
name: 'custom-css',
getClientModules() {
return [
require.resolve('./docs/assets/css/docusaurus.scss'),
require.resolve('./docs/assets/js/preview-enhancements.js')
]
}
}
},
[
'@docusaurus/plugin-content-docs',
{
routeBasePath: '/',
editUrl: 'https://github.com/DEFRA/forms-engine-plugin/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: 'Forms Engine Plugin',
serviceHref: '/',
organisationText: 'Defra DDTS',
organisationHref: 'https://github.com/defra'
},
navigation: [
{ text: 'Getting Started', href: '/getting-started', sidebar: 'auto' },
{
text: 'Features',
href: '/features',
sidebar: [
{ text: 'Components', href: '/features/components' },
{ text: 'Page Types', href: '/features/pages' },
{
text: 'Advanced',
href: '/features',
items: [
{
text: 'Configuration-based',
href: '/features/configuration-based'
},
{
text: 'Code-based',
href: '/features/code-based'
}
]
}
]
},
{ text: 'Plugin Options', href: '/plugin-options', sidebar: 'auto' },
{ text: 'Schema', href: '/schemas', sidebar: 'auto' },
{
text: 'Reference',
href: '/request-lifecycle',
sidebar: [
{ text: 'Request Lifecycle', href: '/request-lifecycle' },
{
text: 'Form Definition Formats',
href: '/form-definition-formats'
}
]
}
],
phaseBanner: {
phase: 'beta',
text: 'This is a new capability. Help us improve it and give your feedback on Slack.'
},
footer: {
meta: [
{
text: 'GitHub',
href: 'https://github.com/DEFRA/forms-engine-plugin'
},
{
text: 'Contributing',
href: '/forms-engine-plugin/contributing'
}
]
},
homepage: {
getStartedHref: '/getting-started',
description:
'Configuration-driven and extensible, built on Hapi.js. Handles routing, validation, state management, and GOV.UK Frontend rendering — so teams can focus on form design, not plumbing.'
}
}
}
}
module.exports = config