Merge pull request #3 from seigler/topnav

Bounty: Enable fixed ordering of top nav items
This commit is contained in:
Andy Freer 2020-03-11 20:55:47 +00:00 committed by GitHub
commit 214b17da26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 7 deletions

View file

@ -2,6 +2,7 @@ title: Docs
color: green
icon: stroke_decentralization
description: Dash Platorm Documentation resources.
weight: 10
content:
- title: DashJS
website: https://dashevo.github.io/DashJS

View file

@ -2,6 +2,7 @@ title: Tools
color: yellow
icon: stroke_code
description: Tools for developing with Dash Platform.
weight: 6
content:
- title: EvoNet Faucet
website: http://devnet-evonet-1117662964.us-west-2.elb.amazonaws.com/

12
package-lock.json generated
View file

@ -184,9 +184,9 @@
}
},
"acorn": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"acorn-jsx": {
@ -3750,9 +3750,9 @@
}
},
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true
},
"labeled-stream-splicer": {

View file

@ -13,10 +13,11 @@ module.exports = fs.readdirSync(dir)
file.slug = slugify(file.title)
file.type = 'category'
file.content = file.content.map(({ title, description, ...meta }, i) => ({
file.content = file.content.map(({ title, description, weight, ...meta }, i) => ({
...meta,
title: trimIfExists(title),
description: trimIfExists(description),
weight: weight,
category: file.slug,
color: file.color,
index: i
@ -32,3 +33,4 @@ module.exports = fs.readdirSync(dir)
return file
})
.sort((a, b) => sortAbc(a.title, b.title))
.sort((a, b) => sortInv(a.weight, b.weight))