Skip to content

Commit

Permalink
Put newest release first (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomgomba authored Oct 19, 2023
1 parent f56c90c commit 074a8a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const katex = require('rehype-katex')

require('dotenv').config()

const sortDescending = ['release']

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Betaflight',
Expand Down Expand Up @@ -83,6 +85,11 @@ const config = {
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',*/
remarkPlugins: [math],
rehypePlugins: [katex],
async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) {
const sidebarItems = await defaultSidebarItemsGenerator(args)
const mustReverse = sortDescending.includes(args.item.dirName)
return mustReverse ? sidebarItems.reverse() : sidebarItems
},
},
blog: false,
theme: {
Expand Down

0 comments on commit 074a8a7

Please sign in to comment.