Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie committed Mar 13, 2019
1 parent ef5bb1f commit b72105d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
15 changes: 0 additions & 15 deletions website/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ exports.createPages = ({ actions, graphql }) => {
navGroup
workspaceSlug
sortOrder
packageName
isPackageIndex
}
}
Expand Down Expand Up @@ -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
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const navLinks = [
},
{
name: 'Packages',
url: '/packages/keystone-alpha/core/',
url: '/keystone-alpha/core/',
},
];

Expand Down
3 changes: 2 additions & 1 deletion website/src/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default () => (
css={{
textDecoration: 'none',
color: colors.B.D50,
textTransform: 'capitalize',
marginLeft: 4,

'&:hover': {
Expand All @@ -97,7 +98,7 @@ export default () => (
}}
to={node.path}
>
{ prettyName(node, navGroup) }
{prettyName(node, navGroup)}
</Link>
</li>
);
Expand Down

0 comments on commit b72105d

Please sign in to comment.