diff --git a/src/data/sidenav.json b/src/data/sidenav.json new file mode 100644 index 000000000..c70e856bf --- /dev/null +++ b/src/data/sidenav.json @@ -0,0 +1,7 @@ +[ + { + "displayName": "Guides", + "url": "/guides", + "children": [] + } +] diff --git a/src/pages/reference.js b/src/pages/reference.js index 7e7f3f9c8..f315cf092 100644 --- a/src/pages/reference.js +++ b/src/pages/reference.js @@ -1,10 +1,9 @@ import React, { useState } from 'react'; -import { useStaticQuery, graphql } from 'gatsby'; - import Container from '../components/Container'; import Layout from '../components/Layout'; import Sidebar from '../components/Sidebar'; -import navFromEdges from '../utils/nav-from-edges'; + +import pages from '../data/sidenav.json'; // TODO: move this js file to same directory and update import import '../templates/Reference.scss'; @@ -12,22 +11,6 @@ import '../templates/Reference.scss'; const Reference = () => { const [isOpen, setIsOpen] = useState(false); - const data = useStaticQuery(graphql` - query { - allMarkdownRemark(limit: 1000) { - edges { - node { - frontmatter { - path - title - } - } - } - } - } - `); - const pages = navFromEdges(data.allMarkdownRemark.edges); - return (