Skip to content

Commit 3c6a5c4

Browse files
committed
fix: trailingSlash causing notebooks to be basic html on github pages
It was working fine locally - famous words. But, GitHub Pages adds trailing slash which loads up the basic nbconverted html rather than the Astro wrapper page, so, no themeing and barebones page. To fix, trailingSlash will always be used and applied. But, bug introduced: images not loading only with 'npm run dev'.
1 parent 84fe9c1 commit 3c6a5c4

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/components/ui/CircularMenu.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ export default function CircularMenu() {
3333
// Map each modal to a /notebooks/{slug} route
3434
// This should be <name>.ipynb, but skipping the file extension
3535
const modalMap: Record<string, string> = {
36-
modal_s1: 'polynomials_over_subspaces',
37-
modal_s2: 'stochastic_polynomials',
38-
modal_s3: 'polynomial_gradients',
39-
modal_s4: 'sparse_polynomials',
40-
modal_s5: 'kernels_as_polynomials',
41-
modal_s6: 'moments_and_sensitivity_analysis',
42-
modal_s7: 'numerical_integration',
43-
modal_s8: 'polynomials_over_cubes',
36+
modal_s1: 'polynomials_over_subspaces/',
37+
modal_s2: 'stochastic_polynomials/',
38+
modal_s3: 'polynomial_gradients/',
39+
modal_s4: 'sparse_polynomials/',
40+
modal_s5: 'kernels_as_polynomials/',
41+
modal_s6: 'moments_and_sensitivity_analysis/',
42+
modal_s7: 'numerical_integration/',
43+
modal_s8: 'polynomials_over_cubes/',
4444
};
4545

4646
Object.entries(modalMap).forEach(([modalId, slug]) => {

src/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ site:
22
name: equadratures
33
site: 'https://equadratures.org'
44
base: '/'
5-
trailingSlash: false
5+
trailingSlash: true
66

77
googleSiteVerificationId: orcPxI47GSa-cRvY11tUe6iGg2IO_RPvnA1q95iEM3M
88

src/navigation.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ export const headerData = {
44
links: [
55
{
66
text: 'A Short Course',
7-
href: getPermalink('/a-short-course'),
7+
href: getPermalink('/a-short-course/'),
88
},
99
{
1010
text: 'Papers',
11-
href: getPermalink('/papers'),
11+
href: getPermalink('/papers/'),
1212
},
1313
{
1414
text: 'Case Studies',
1515
links: [
1616
{
1717
text: 'Coastal Dynamics',
18-
href: getPermalink('/case-studies/coastal-dynamics'),
18+
href: getPermalink('/case-studies/coastal-dynamics/'),
1919
},
2020
{
2121
text: 'Aerospace Design and Manufacturing',
22-
href: getPermalink('/case-studies/aerospace-design-and-manufacturing'),
22+
href: getPermalink('/case-studies/aerospace-design-and-manufacturing/'),
2323
},
2424
],
2525
},
@@ -32,14 +32,14 @@ export const footerData = {
3232
{
3333
title: 'Affiliations',
3434
links: [
35-
{ text: 'NumFOCUS', href: '/numfocus' },
36-
{ text: 'Google Summer of Code', href: '/gsoc' },
35+
{ text: 'NumFOCUS', href: '/numfocus/' },
36+
{ text: 'Google Summer of Code', href: '/gsoc/' },
3737
],
3838
},
3939
{
4040
title: 'Management',
4141
links: [
42-
{ text: 'Partnerships', href: '/partnerships' },
42+
{ text: 'Partnerships', href: '/partnerships/' },
4343
],
4444
},
4545
{

0 commit comments

Comments
 (0)