-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocusaurus.config.js
277 lines (274 loc) · 11.9 KB
/
docusaurus.config.js
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const remarkFootnotes = require('remark-footnotes');
const remarkAdmonitions = require('remark-admonitions');
const definitionsPlugin = require('./definitions');
const bylawLinksPlugin = require('./bylawlinksplugin');
const highlightPlugin = require('./highlight');
const subnumberingPlugin = require('./subnumbering');
const webpackPlugin = require('./webpackplugin');
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
(module.exports = {
title: 'AGV Rules',
tagline: 'Browsable governance',
url: 'https://australiangreens.github.io',
baseUrl: '/agvrules/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'australiangreens', // Usually your GitHub org/user name.
projectName: 'agvrules', // Usually your repo name.
trailingSlash: true,
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
breadcrumbs: false,
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: undefined,
remarkPlugins: [
[remarkFootnotes, { }],
[remarkAdmonitions, {
tag: ":::",
icons: "emoji",
infima: true,
customTypes: {
"effectivefrom": {
ifmClass: 'warning',
emoji: '⌛'
}
}
}],
[bylawLinksPlugin, {}],
[definitionsPlugin, { definitions: {
"AA": "Affirmative Action",
"AEC": "Australian Electoral Commission",
"AF": "Audit and Finance Committee",
"AG": "Australian Greens",
"AG": "Attorney-General",
"AGPCC": "Australian Greens Policy Coordination Committee",
"AGM": "Annual General Meeting",
"AGV": "Australian Greens Victoria",
"ALP": "Australian Labor Party",
"AJP": "Animal Justice Party",
"AIR": "Associations Incorporation Reform Act ",
"APH": "Australian Parliament House",
"ARP": "Administrative Review Panel",
"AssSec": "Assistant Secretary",
"ASS": "Assistant State Secretary",
"AusPol": "Australian Politics",
"AYG": "Australian Young Greens",
"BRT": "Branch Reporting Tool",
"CAV": "Consumer Affairs Victoria",
"CEPWG": "Climate and Energy Policy Working Group",
"CGN": "Country Greens Network",
"CiviCRM": "Civi Customer Relationship Management (It’s just CiviCRM or Civi)",
"CMT": "Campaign Management Team",
"COM": "Committee of Management (In existence in some state Greens)",
"Conf": "Conference",
"CoS": "Chief of Staff",
"CRP": "Constitutional Review Panel",
"Co-Co": "Co-Convenor",
"DIM": "Decisions Implementation Matrix",
"DRG": "Donations Reference Group",
"DRO": "Deputy Returning Officer",
"EAP": "Employee Assistance Program",
"ECC": "Election/Electorate Campaign Committee",
"EGM": "Extraordinary General Meeting",
"EMRC": "Eastern Metro Regional Council",
"EMS": "Election Management System",
"EoI": "Expressions of Interest",
"ERC": "Endorsement Review Committee",
"ETS": "Emissions Trading Scheme",
"Exec": "State Executive",
"FAIC": "Finance, Administration and Infrastructure Committee",
"FNN": "First Nations Network",
"GG": "Global Greens",
"GIG": "Global Issues Group",
"GPEW": "Greens Party of England & Wales",
"GM": "(Ordinary) General Meeting",
"GMO": "Genetically Modified Organisms",
"GRN": "Greens",
"GVIRS": "Grassroots Voter Interaction Recording System",
"HoR": "House of Representatives",
"HRC": "Human Rights Commission",
"HtV": "How to Vote",
"HTVC": "How to Vote Card",
"ICAC": "Independent Commission Against Corruption",
"IRV": "Instant Runoff Voting",
"IP Policy": "Israel/Palestine Resolution",
"JSJ": "Jordon Steele-John",
"J-Greens": "Jewish Greens",
"LAB": "Australian Labor Party",
"LEAN": "Labor Environment Action Network",
"LG": "Local Government",
"LGA": "Local Government Area",
"LGC": "Local Government Councillors",
"LGBTIQA+": "Lesbian, Gay, Bisexual, Trans, Intersex, Queer, Asexual/Aromantic",
"LNP": "Liberal National Party",
"LIB": "Liberal Party",
"LO": "Leader’s Office",
"LP": "Liberal Party",
"LRRR": "Left Renewal Renewal Renewal",
"LR": "The OG Left Renewal",
"MEC": "Membership Engagement Committee ",
"MeP": "Mediation Panel",
"MGV": "Multicultural Greens Victoria",
"MiP": "Misconduct Panel",
"MLA": "Member (of) Legislative Assembly (not commonly used in VIC, see MP)",
"MLC": "Member (of) Legislative Council (Victorian state parliament upper house)",
"MP": "Member (of) Parliament",
"MTC": "Meet The Candidates (sometimes called Hustings)",
"NAC": "National Affairs Committee (now NCC)",
"NatCon": "National Conference",
"NB": "NationBuilder",
"NC": "National Council",
"NCC": "National Conference Committee",
"NM": "Northern Metropolitan region",
"NVRSECC": "Northern Victoria Regional Standing Campaign Committee",
"OB": "Office Bearer",
"ON": "One Nation",
"PDWG": "Participatory Democracy Working Group",
"PCC": "Policy Coordination Committee",
"PHON": "Pauline Hanson’s One Nation",
"PR": "Party Room",
"PSC": "Policy Steering Committee",
"PWDWG": "People With Disabilities Working Group",
"PWG": "Policy Working Group",
"QDMG": "Quick Decision Making Group",
"QGV": "Queer Greens Victoria",
"RDN": "Richard Di Natali",
"RO": "Returning Officer",
"ROCkET": "Recruit, Organise, Campaign, Engagement Tool",
"RR": "Risk Register",
"SAlt": "Socialist Alternatives",
"SC": "State Council",
"SD": "State Director",
"SDC": "State Delegates Council (used in other states)",
"SFC": "Seek Further Candidate",
"SGM": "Special General Meeting",
"SHY": "Sarah Hanson-Young",
"SM": "Southern Metropolitan region",
"STV": "Single Transferable Vote",
"SECC": "Standing Election Campaign Committee Report",
"SEMRC": "South Eastern Metro Regional Council",
"SO": "State Office",
"STEM": "Statewide Tool for Election Management",
"TGDNB": "Trans, Gender Diverse, and Non-Binary",
"ToR": "Terms of Reference",
"VEC": "Victorian Election Commission",
"VEOHRC": "Victorian Equal Opportunity and Human Rights Commission",
"Vic": "Victoria",
"VicPol": "Victorian Politics",
"VicPol": "Victorian Police",
"VicSoc": "Victorian Socialists",
"VCAT": "Victorian Civil and Administrative Tribunal",
"VCC": "Victorian Campaign Committee",
"VG": "Victorian Greens",
"VGWN": "Victorian Greens Women's Network",
"VLGA": "Victorian Local Government Association",
"VPD": "Victorian Positions Document",
"VPL": "Victorian Pride Lobby",
"VYG": "Victorian Young Greens",
"WVRCC": "Western Victoria Regional Campaign Committee",
"most senior member of the agv staff": "State Director",
"most senior agv staff member": "State Director",
"most senior staff member": "State Director",
} } ]
]
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
plugins: [
[require.resolve('@easyops-cn/docusaurus-search-local'), {
docsRouteBasePath: '/',
highlightSearchTermsOnTargetPage: true,
searchResultLimits: 10,
searchResultContextMaxLength: 100
}],
[
require.resolve('@docusaurus/plugin-client-redirects'),
{
createRedirects: function (existingPath) {
if (existingPath.startsWith('/old-bylaws/')) {
let links = [];
links.push(existingPath.replace('old-bylaws', 'bylaws'));
const matches = existingPath.match(/[0-9]{2}/);
if (matches) {
const bylawNumber = matches[0];
const shortLink = `/bylaws/${bylawNumber}`;
// Don't break old URLs
const shortLinkOld = shortLink.replace('old-bylaws', 'bylaws');
const shorterLink = `/bylaws/${parseInt(bylawNumber)}`;
const shorterLinkOld = shorterLink.replace('old-bylaws', 'bylaws')
return shortLink === shorterLink ? [...links, shortLink, shortLinkOld] : [...links, shortLink, shortLinkOld, shorterLink, shorterLinkOld];
}
return links;
}
if (existingPath.startsWith('/constitution/')) {
let links = [];
links.push(existingPath.replace('constitution', 'new-constitution'));
const scheduleMatches = existingPath.match(/(?:schedule-)([0-9]{2})/);
if (scheduleMatches) {
const scheduleNumber = scheduleMatches[1];
const shortLink = `/constitution/schedule-${scheduleNumber}`;
// Don't break old URLs
const shortLinkNew = shortLink.replace('constitution', 'new-constitution');
const shorterLink = `/constitution/schedule-${parseInt(scheduleNumber)}`;
const shorterLinkNew = shorterLink.replace('constitution', 'new-constitution');
return shortLink === shorterLink ? [...links, shortLink, shortLinkNew] : [...links, shortLink, shortLinkNew, shorterLink, shorterLinkNew];
}
return links;
}
},
},
],
[highlightPlugin, {}],
[subnumberingPlugin, {}],
[webpackPlugin, {}],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'AGV Rules',
logo: {
alt: 'AGV logo coming soon',
src: 'img/logo.svg',
},
items: [
{to: '/constitution', label: 'Constitution', position: 'left'},
{to: '/terms-of-reference', label: 'Terms of Reference', position: 'left'},
{to: '/charter', label: 'Charter', position: 'left'}
],
},
footer: {
style: 'dark',
links: [
{
title: 'Contribute',
items: [
{
label: 'GitHub',
href: 'https://github.com/australiangreens/agvrules',
},
],
},
],
copyright: `Authorised by governance nerds everywhere, 1/45 William St, Melbourne, VIC 3000. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
});