Skip to content

Commit

Permalink
localeCompare
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Dec 29, 2024
1 parent 192c3b2 commit 24dd655
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/my-website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ const config = {
id: 'release_notes',
path: './release_notes', // Folder where your release notes are stored
routeBasePath: '/release_notes', // URL path for the release notes
sortPosts: 'descending',
sortPosts: (a, b) => {
// Extract folder names from the file paths
const folderA = a.metadata.permalink.split('/')[2]; // Get folder name from permalink
const folderB = b.metadata.permalink.split('/')[2];
return folderA.localeCompare(folderB); // Compare folder names
},
include: ['**/*.md', '**/*.mdx'], // Files to include
// Other blog options
},
Expand Down

0 comments on commit 24dd655

Please sign in to comment.