Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/beta_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Build website
run: npm run build
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Build website
run: npm run build
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
43 changes: 0 additions & 43 deletions src/content/reference/en/p5/makeGuardedCallbacks.mdx

This file was deleted.

20 changes: 0 additions & 20 deletions src/content/reference/en/p5/vectorValidation.mdx

This file was deleted.

14 changes: 12 additions & 2 deletions src/pages/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ interface EntryWithId {
*/
export const getCollectionInDefaultLocale = async <C extends CollectionKey>(
collectionName: C,
): Promise<CollectionEntry<C>[]> =>
await getCollection(collectionName, (entry: unknown) => {
): Promise<CollectionEntry<C>[]> => {
const collection = await getCollection(collectionName, (entry: unknown) => {
const { id } = entry as EntryWithId;
return id.startsWith(`${defaultLocale}/`);
});

if (collectionName === "reference") {
collection.forEach((entry) => {
if (entry.filePath) {
entry.id = entry.filePath.split("/").slice(3).join("/").replace(/\.mdx$/, "");
}
});
}
return collection;
};

/**
* Retreives all the entries in the given collection for a given locale, and
* includes entries in the default locale for entries that aren't localized
Expand Down