Skip to content

Commit c335200

Browse files
authored
Merge pull request #1260 from limzykenneth/case-insensitive
Basic case insensitive route matching
2 parents 12ff277 + ddae2e5 commit c335200

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.github/workflows/beta_deploy.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ jobs:
1818
build-deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21+
- uses: actions/setup-node@v6.3.0
22+
node-version: 22.22.x
2123
- name: Checkout your repository using git
2224
uses: actions/checkout@v4
23-
- name: Setup Node.js
24-
uses: actions/setup-node@v4
25-
with:
26-
node-version: '22'
2725
- name: Install dependencies
28-
run: npm ci
26+
run: npm run install
2927
- name: Build website
3028
run: npm run build
3129
- name: Deploy to Cloudflare Workers

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ jobs:
1818
build-deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21+
- uses: actions/setup-node@v6.3.0
22+
node-version: 22.22.x
2123
- name: Checkout your repository using git
2224
uses: actions/checkout@v4
25+
- name: Install dependencies
26+
run: npm run install
2327
- name: Build website
2428
run: npm run build
2529
- name: Deploy to Cloudflare Workers

src/pages/reference/[...id].astro

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import type { GetStaticPathsResult } from "astro";
23
import ReferenceItemLayout from "@/src/layouts/ReferenceItemLayout.astro";
34
import {
45
getCollectionInDefaultLocale,
@@ -21,7 +22,16 @@ export async function getStaticPaths() {
2122
return relatedEntry.data.submodule === entry.data.submodule;
2223
}),
2324
},
24-
}));
25+
}))
26+
.reduce<GetStaticPathsResult>((acc, entry) => {
27+
acc.push(entry);
28+
acc.push(Object.assign({}, entry, {
29+
params: {
30+
id: entry.params.id.toLowerCase()
31+
}
32+
}));
33+
return acc;
34+
}, []);
2535
}
2636
2737
const { entry, relatedEntries } = Astro.props;

0 commit comments

Comments
 (0)