From b72105d9d687ca5393b417a6a64e913333fc3366 Mon Sep 17 00:00:00 2001 From: Tim Leslie Date: Wed, 13 Mar 2019 15:44:48 +1100 Subject: [PATCH] WIP --- website/gatsby-node.js | 15 --------------- website/src/components/Header.js | 2 +- website/src/components/Sidebar.js | 3 ++- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/website/gatsby-node.js b/website/gatsby-node.js index cf252f1f0e0..11982fd73f5 100644 --- a/website/gatsby-node.js +++ b/website/gatsby-node.js @@ -25,7 +25,6 @@ exports.createPages = ({ actions, graphql }) => { navGroup workspaceSlug sortOrder - packageName isPackageIndex } } @@ -97,19 +96,6 @@ exports.onCreateNode = async ({ node, actions, getNode }) => { // This is the root of a particular package const isPackageIndex = isPackage && relativePath === 'README.md'; - const workspace = sourceInstanceName.startsWith('packages') ? 'packages' : sourceInstanceName; - let packageName = ''; - if (workspace === 'packages') { - if (sourceInstanceName.includes('keystone-alpha')) { - packageName = `@keystone-alpha/${ - sourceInstanceName.split('keystone-alpha/')[1].split('/')[0] - }`; - } else { - packageName = 'create-keystone-app'; - } - } else { - packageName = workspace; - } const fieldsToAdd = { // This value is added in `gatsby-config` as the "name" of the plugin. // Since we scan every workspace and add that as a separate plugin, we @@ -118,7 +104,6 @@ exports.onCreateNode = async ({ node, actions, getNode }) => { navGroup, workspaceSlug: slugify(sourceInstanceName), editUrl: getEditUrl(get(node, 'fileAbsolutePath')), - packageName, // The full path to this "node" slug: generateUrl(parent), sortOrder: NAV_BAR_ORDER.indexOf(navGroup), diff --git a/website/src/components/Header.js b/website/src/components/Header.js index e86d68a3a6d..43a4be9d54a 100644 --- a/website/src/components/Header.js +++ b/website/src/components/Header.js @@ -38,7 +38,7 @@ const navLinks = [ }, { name: 'Packages', - url: '/packages/keystone-alpha/core/', + url: '/keystone-alpha/core/', }, ]; diff --git a/website/src/components/Sidebar.js b/website/src/components/Sidebar.js index a16453937d0..1afdea62515 100644 --- a/website/src/components/Sidebar.js +++ b/website/src/components/Sidebar.js @@ -84,6 +84,7 @@ export default () => ( css={{ textDecoration: 'none', color: colors.B.D50, + textTransform: 'capitalize', marginLeft: 4, '&:hover': { @@ -97,7 +98,7 @@ export default () => ( }} to={node.path} > - { prettyName(node, navGroup) } + {prettyName(node, navGroup)} );