Skip to content

Commit c61b9af

Browse files
authored
Merge pull request #1421 from limzykenneth/2.0-deps-update
[2.0] Fix reference URL not matching case sensitively
2 parents 67da041 + fc1b968 commit c61b9af

5 files changed

Lines changed: 14 additions & 67 deletions

File tree

‎.github/workflows/beta_deploy.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Build website
2929
run: npm run build
3030
- name: Deploy to Cloudflare Workers
31-
uses: cloudflare/wrangler-action@v3
31+
uses: cloudflare/wrangler-action@v4
3232
with:
3333
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3434
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

‎.github/workflows/deploy.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Build website
2929
run: npm run build
3030
- name: Deploy to Cloudflare Workers
31-
uses: cloudflare/wrangler-action@v3
31+
uses: cloudflare/wrangler-action@v4
3232
with:
3333
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3434
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

‎src/content/reference/en/p5/makeGuardedCallbacks.mdx‎

Lines changed: 0 additions & 43 deletions
This file was deleted.

‎src/content/reference/en/p5/vectorValidation.mdx‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎src/pages/_utils.ts‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,22 @@ interface EntryWithId {
2626
*/
2727
export const getCollectionInDefaultLocale = async <C extends CollectionKey>(
2828
collectionName: C,
29-
): Promise<CollectionEntry<C>[]> =>
30-
await getCollection(collectionName, (entry: unknown) => {
29+
): Promise<CollectionEntry<C>[]> => {
30+
const collection = await getCollection(collectionName, (entry: unknown) => {
3131
const { id } = entry as EntryWithId;
3232
return id.startsWith(`${defaultLocale}/`);
3333
});
3434

35+
if (collectionName === "reference") {
36+
collection.forEach((entry) => {
37+
if (entry.filePath) {
38+
entry.id = entry.filePath.split("/").slice(3).join("/").replace(/\.mdx$/, "");
39+
}
40+
});
41+
}
42+
return collection;
43+
};
44+
3545
/**
3646
* Retreives all the entries in the given collection for a given locale, and
3747
* includes entries in the default locale for entries that aren't localized

0 commit comments

Comments
 (0)