Skip to content

Commit

Permalink
properly rendering visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
AceTheCreator committed May 17, 2024
1 parent b0c68e0 commit 6d1bf78
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
4 changes: 4 additions & 0 deletions pages/docs/reference/specification/v3.0.0-explorer.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
title: '3.0.0 - Explorer'
---

<Visualizer />
12 changes: 0 additions & 12 deletions pages/spec-json-schema/index.js

This file was deleted.

3 changes: 1 addition & 2 deletions scripts/build-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ function buildNavTree(navItems) {

//first we make sure that list of items lists main section items and then sub sections, documents last
const sortedItems = sortBy(navItems, ['isRootSection', 'weight', 'isSection']);
console.log(sortedItems)

sortedItems.forEach(item => {
//identify main sections
Expand Down Expand Up @@ -126,7 +125,7 @@ function addDocButtons(docPosts, treePosts){
title: structuredPosts[index+1].title,
href: structuredPosts[index+1].slug
}
}else{
} else {
nextPage = {
title: `${structuredPosts[index+1].title} - ${structuredPosts[index+2].title}`,
href: structuredPosts[index+2].slug
Expand Down
7 changes: 4 additions & 3 deletions scripts/build-post-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ function walkDirectories(directories, result, sectionWeight = 0, sectionTitle, s
if(details.slug.includes('/reference/specification/') && !details.title) {
const fileBaseName = basename(data.slug) // ex. v2.0.0 | v2.1.0-next-spec.1
const fileName = fileBaseName.split('-')[0] // v2.0.0 | v2.1.0

details.weight = specWeight--

if(fileName.startsWith('v')) {
details.title = capitalize(fileName.slice(1))
if (fileName.startsWith('v')) {
details.title = capitalize(fileName.slice(1))
} else {
details.title = capitalize(fileName)
}
Expand All @@ -122,6 +121,8 @@ function walkDirectories(directories, result, sectionWeight = 0, sectionTitle, s
// this need to be separate because the `-` in "Pre-release" will get removed by `capitalize()` function
details.title += " (Pre-release)"
}
} else if(details.slug.includes('/reference/specification/') && details.title) {
details.title = details.title
}


Expand Down

0 comments on commit 6d1bf78

Please sign in to comment.