File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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 }}
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,12 +26,22 @@ interface EntryWithId {
2626 */
2727export 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 ( / \. m d x $ / , "" ) ;
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
You can’t perform that action at this time.
0 commit comments