Skip to content

Commit

Permalink
fix(site/pages): Fixed missing links for site pages (#174)
Browse files Browse the repository at this point in the history
Fixed links in top right for guidelines, getting-started, and react-reference.
  • Loading branch information
dmiller9911 authored and dgutride committed Apr 20, 2018
1 parent 6329440 commit ebc60f6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
47 changes: 27 additions & 20 deletions gatsby-config.js
@@ -1,6 +1,6 @@
const path = require('path')
const path = require('path');

const PROJECT_ROOT = path.resolve(__dirname)
const PROJECT_ROOT = path.resolve(__dirname);

const plugins = [
'gatsby-plugin-react-helmet',
Expand All @@ -13,41 +13,48 @@ const plugins = [
options: {
postCssPlugins: [],
precision: 5
},
}
},
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${PROJECT_ROOT}/src/patternfly`,
path: `${PROJECT_ROOT}/src/patternfly`
}
},
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${PROJECT_ROOT}/src/site/pages`,
name: 'pages'
path: `${PROJECT_ROOT}/src/site/pages`,
name: 'pages'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${PROJECT_ROOT}/src/patternfly`,
name: 'patternfly',
},
name: 'patternfly'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${PROJECT_ROOT}/src/site/pages`,
name: 'pages'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${PROJECT_ROOT}/src/site/_site`,
name: 'site-components',
},
name: 'site-components'
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${PROJECT_ROOT}/src/site/img`,
name: 'images',
},
name: 'images'
}
},
{
resolve: 'gatsby-transformer-remark',
Expand All @@ -59,21 +66,21 @@ const plugins = [
options: {
classPrefix: 'prism-language-'
}
},
],
},
}
]
}
},
{
resolve: 'gatsby-remark-embed-snippet',
options: {
directory: `${__dirname}/src/patternfly`,
},
directory: `${__dirname}/src/patternfly`
}
}
]
];

module.exports = {
siteMetadata: {
title: 'PF Next',
title: 'PF Next'
},
plugins
}
};
2 changes: 2 additions & 0 deletions gatsby-node.js
Expand Up @@ -95,6 +95,7 @@ exports.createPages = ({ boundActionCreators, graphql }) => {
__dirname,
`./src/site/templates/${node.fields.type}.js`
),
layout: 'index',
context: {
pagePath: node.fields.path,
type: node.fields.type,
Expand Down Expand Up @@ -143,6 +144,7 @@ exports.onCreatePage = async ({ page, boundActionCreators }) => {
page.context.slug = '';
page.context.name = '';
page.context.title = '';
page.layout = 'index';

if (isCategoryPage) {
page.context.type = 'category';
Expand Down

0 comments on commit ebc60f6

Please sign in to comment.