This repository was archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
91 lines (88 loc) · 2.44 KB
/
docusaurus.config.js
File metadata and controls
91 lines (88 loc) · 2.44 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
const generateAnnouncementBar = () => {
const environment = process.env.ENVIRONMENT || 'development'
// The reponse must be 'undefined' else docusaurus attempts to retrieve the content field
if (environment === 'production') return undefined
return {
id: 'environment_banner',
content: `You are currently viewing the <b style="color: ${
environment == 'development' ? '#e03c31' : '#00b341'
}">${environment}</b> environment.`,
backgroundColor: '#fafbfc',
textColor: '#091E42',
isCloseable: false,
}
}
const generateTitle = () => {
const environment = process.env.ENVIRONMENT
if (environment === 'production') return 'API Playbook'
return `API Playbook ${
environment?.charAt(0).toUpperCase() + environment?.slice(1)
}`
}
module.exports = {
title: 'Hackney API Playbook',
tagline: "A guide on Hackney's development practices, and how to follow them",
url: 'https:/playbook.hackney.gov.uk',
baseUrl: '/API-Playbook/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.png',
organizationName: 'lbhackney-it',
projectName: 'API-Playbook',
themeConfig: {
prism: {
additionalLanguages: ['csharp'],
},
navbar: {
title: generateTitle(),
logo: {
alt: 'API Playbook',
src: 'img/logo-long.svg',
},
items: [
{
href: 'https://github.com/LBHackney-IT/API-Playbook',
label: 'GitHub',
position: 'right',
},
],
},
announcementBar: generateAnnouncementBar(),
algolia: {
appId: 'KNMFHOJ4X2',
apiKey: '4dc9b48c851c09d44e9cf356d5425867',
indexName: 'hackney',
placeholder: 'Search playbook',
searchPagePath: 'false',
searchParameters: {
filters: "playbook_site:API-Playbook"
}
},
footer: {
style: 'dark',
links: [],
copyright: `Made by HackIT.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/LBHackney-IT/API-Playbook/edit/main/',
},
theme: {
customCss: [require.resolve('./src/docs.scss')],
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
},
},
],
],
clientModules: [require.resolve('./src/docs.js')],
plugins: ['docusaurus-plugin-sass', 'plugin-image-zoom']
}