File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ export const generateJumpToState = async (
377
377
category === getExampleCategory ( currentEntrySlug )
378
378
) {
379
379
// Get all entries in the current category
380
- const currentCategoryEntries = localeEntries . filter (
380
+ let currentCategoryEntries = localeEntries . filter (
381
381
( entry ) =>
382
382
category ===
383
383
( collectionType === "examples"
@@ -386,6 +386,14 @@ export const generateJumpToState = async (
386
386
entry . data . category ?? "" ) ,
387
387
) ;
388
388
389
+ if ( collectionType === "tutorials" ) {
390
+ currentCategoryEntries = currentCategoryEntries . sort (
391
+ ( a , b ) =>
392
+ ( ( a . data as any ) . categoryIndex ?? 1000 ) -
393
+ ( ( b . data as any ) . categoryIndex ?? 1000 ) ,
394
+ ) ;
395
+ }
396
+
389
397
// Add the entries in the category to the jumpToLinks
390
398
categoryLinks . push (
391
399
...currentCategoryEntries . map (
You can’t perform that action at this time.
0 commit comments