Sort models sidebar alphabetically [ci skip]

This commit is contained in:
Ines Montani 2020-10-15 22:47:16 +02:00
parent 20f80587d6
commit 32dc4f4796

View File

@ -42,6 +42,7 @@ const Docs = ({ pageContext, children }) => (
if (isModels) {
sidebar.items[1].items = languages
.filter(({ models }) => models && models.length)
.sort((a, b) => a.name.localeCompare(b.name))
.map(lang => ({
text: lang.name,
url: `/models/${lang.code}`,