Skip to content

Commit 82fa767

Browse files
committed
Classifier and bug fix
1 parent 5078c28 commit 82fa767

5 files changed

Lines changed: 704 additions & 47 deletions

File tree

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/theme/src/index.ts

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ const communityFooterColumn = {
1111
title: 'Community',
1212
items: [
1313
{ label: 'Q&A Discussions', href: 'https://github.com/orgs/RAPath/discussions' },
14-
{ label: 'Report an Error', href: 'https://github.com/orgs/RAPath/discussions/new?category=corrections' },
15-
{ label: 'GitHub', href: 'https://github.com/RAPath' },
14+
{ label: 'Report an Error', href: 'https://github.com/orgs/RAPath/discussions/new?category=corrections' },
15+
{ label: 'GitHub', href: 'https://github.com/RAPath' },
1616
],
1717
};
1818

1919
const rapathFooterColumn = {
2020
title: 'RAPath',
2121
items: [
22-
{ label: 'All Jurisdictions', href: 'https://rapath.github.io/' },
23-
{ label: 'Terms', href: 'https://rapath.github.io/terms' },
22+
{ label: 'All Jurisdictions', href: 'https://rapath.github.io/#jurisdictions' },
23+
{ label: 'Terms', href: 'https://rapath.github.io/terms' },
2424
],
2525
};
2626

@@ -43,38 +43,38 @@ function buildCopyright(params: { title: string; disclaimerSourcesHtml: string }
4343
interface FooterLink {
4444
label: string;
4545
href?: string;
46-
to?: string;
46+
to?: string;
4747
}
4848

4949
interface SiteParams {
50-
siteCode: string;
51-
title: string;
52-
tagline: string;
53-
sidebarId: string;
54-
whatsNewPath: string;
55-
githubDiscussions?: string;
56-
githubRepo?: string;
57-
sections: FooterLink[];
58-
officialSources: FooterLink[];
59-
regulatorName: string;
50+
siteCode: string;
51+
title: string;
52+
tagline: string;
53+
sidebarId: string;
54+
whatsNewPath: string;
55+
githubDiscussions?: string;
56+
githubRepo?: string;
57+
sections: FooterLink[];
58+
officialSources: FooterLink[];
59+
regulatorName: string;
6060
disclaimerSourcesHtml: string;
61-
metaKeywords: string;
62-
metaDescription: string;
61+
metaKeywords: string;
62+
metaDescription: string;
6363
}
6464

6565
// ─── Main config builder ──────────────────────────────────────────────────────
6666
export function buildSiteConfig(params: SiteParams): Config {
6767
return {
68-
title: params.title,
68+
title: params.title,
6969
tagline: params.tagline,
7070
favicon: 'favicon.ico',
7171

7272
// future.v4 / faster flags intentionally omitted — see comment in hub config
73-
url: 'https://rapath.github.io',
74-
baseUrl: '/' + params.siteCode + '/',
73+
url: 'https://rapath.github.io',
74+
baseUrl: '/' + params.siteCode + '/',
7575
organizationName: 'RAPath',
76-
projectName: params.siteCode,
77-
trailingSlash: true,
76+
projectName: params.siteCode,
77+
trailingSlash: true,
7878

7979
onBrokenLinks: 'warn',
8080
markdown: { hooks: { onBrokenMarkdownLinks: 'warn' } },
@@ -88,9 +88,9 @@ export function buildSiteConfig(params: SiteParams): Config {
8888
'classic',
8989
{
9090
docs: {
91-
sidebarPath: './sidebars.ts',
92-
routeBasePath: '/',
93-
breadcrumbs: true,
91+
sidebarPath: './sidebars.ts',
92+
routeBasePath: '/',
93+
breadcrumbs: true,
9494
showLastUpdateTime: false,
9595
},
9696
blog: false,
@@ -109,36 +109,41 @@ export function buildSiteConfig(params: SiteParams): Config {
109109
navbar: {
110110
title: params.title,
111111
logo: {
112-
alt: 'RAPath Logo',
113-
src: 'logo.svg',
112+
alt: 'RAPath Logo',
113+
src: 'logo.svg',
114114
srcDark: 'logo.svg',
115115
},
116116
items: [
117117
{
118-
type: 'docSidebar',
118+
type: 'docSidebar',
119119
sidebarId: params.sidebarId,
120-
position: 'left',
121-
label: 'Docs',
120+
position: 'left',
121+
label: 'Docs',
122122
},
123123
{
124-
to: params.whatsNewPath,
125-
label: "What's New",
124+
to: params.whatsNewPath,
125+
label: "What's New",
126126
position: 'left',
127127
},
128128
// Search removed — search is on the hub only (rapath.github.io)
129129
{
130-
href: params.githubDiscussions ?? 'https://github.com/orgs/RAPath/discussions',
131-
label: 'Q&A',
130+
href: 'https://rapath.github.io/tools/classifier',
131+
label: '🔍 Classifier"',
132+
position: 'right',
133+
},
134+
{
135+
href: params.githubDiscussions ?? 'https://github.com/orgs/RAPath/discussions',
136+
label: 'Q&A',
132137
position: 'right',
133138
},
134139
{
135-
href: params.githubRepo ?? 'https://github.com/RAPath',
136-
label: 'GitHub',
140+
href: params.githubRepo ?? 'https://github.com/RAPath',
141+
label: 'GitHub',
137142
position: 'right',
138143
},
139144
{
140-
label: 'Home',
141-
href: 'https://rapath.github.io/',
145+
label: 'Home',
146+
href: 'https://rapath.github.io/',
142147
position: 'right',
143148
},
144149
],
@@ -147,40 +152,40 @@ export function buildSiteConfig(params: SiteParams): Config {
147152
footer: {
148153
style: 'light',
149154
links: [
150-
{ title: 'Sections', items: params.sections },
155+
{ title: 'Sections', items: params.sections },
151156
{ title: 'Official Sources', items: params.officialSources },
152157
communityFooterColumn,
153158
rapathFooterColumn,
154159
],
155160
copyright: buildCopyright({
156-
title: params.title,
161+
title: params.title,
157162
disclaimerSourcesHtml: params.disclaimerSourcesHtml,
158163
}),
159164
},
160165

161166
colorMode: {
162-
defaultMode: 'light',
163-
disableSwitch: false,
167+
defaultMode: 'light',
168+
disableSwitch: false,
164169
respectPrefersColorScheme: true,
165170
},
166171

167172
// Algolia removed from jurisdiction sites — search is on hub only
168173
// Hub search (rapath.github.io) crawls all sites via one rapath-hub index
169174

170175
prism: {
171-
theme: prismThemes.github,
176+
theme: prismThemes.github,
172177
darkTheme: prismThemes.dracula,
173178
},
174179

175180
docs: {
176181
sidebar: {
177-
hideable: false,
182+
hideable: false,
178183
autoCollapseCategories: true,
179184
},
180185
},
181186

182187
metadata: [
183-
{ name: 'keywords', content: params.metaKeywords },
188+
{ name: 'keywords', content: params.metaKeywords },
184189
{ name: 'description', content: params.metaDescription },
185190
],
186191
} satisfies Preset.ThemeConfig,

sites/hub/docusaurus.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@ const config: Config = {
5151
items: [
5252
{
5353
label: 'Browse Jurisdictions',
54-
to: '#jurisdictions',
54+
href: '/#jurisdictions',
5555
position: 'left',
5656
},
5757
{ href: 'https://github.com/orgs/RAPath/discussions', label: 'Q&A', position: 'left' },
5858
{ href: 'https://github.com/RAPath', label: 'GitHub', position: 'left' },
59+
{
60+
to: "/tools/classifier",
61+
label: "🔍 Classifier",
62+
position: "right",
63+
},
5964
{ type: 'search', position: 'right' },
6065
],
6166
},
@@ -73,7 +78,7 @@ const config: Config = {
7378
{
7479
title: 'RAPath',
7580
items: [
76-
{ label: 'All Jurisdictions', to: '/#jurisdictions' },
81+
{ label: 'All Jurisdictions', href: '/#jurisdictions'},
7782
{ label: 'Terms', to: '/terms' },
7883
],
7984
},

sites/hub/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@docusaurus/core": "^3.10.1",
1313
"@docusaurus/preset-classic": "^3.10.1",
1414
"@mdx-js/react": "^3.0.0",
15+
"lucide-react": "^1.16.0",
1516
"react": "^19.0.0",
1617
"react-dom": "^19.0.0"
1718
},

0 commit comments

Comments
 (0)