Skip to content

Commit

Permalink
Removed location props hack now that it's been fixed in Gatbsy (#10773)
Browse files Browse the repository at this point in the history
* Removed location props hack now that it's been fixed in Gatbsy

* Bumped min gatsby-plugin-netlify version to 1.0.4

* Changed blog landing page to /blog/ to match existing site
  • Loading branch information
bvaughn authored Sep 21, 2017
1 parent 8e5c61f commit 2b5c61e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion www/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ exports.createPages = async ({graphql, boundActionCreators}) => {

// Blog landing page should always show the most recent blog entry.
createRedirect({
fromPath: '/blog.html',
fromPath: '/blog/',
toPath: newestBlogEntry.data.allMarkdownRemark.edges[0].node.fields.slug,
});
};
Expand Down
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"gatsby-plugin-glamor": "^1.6.4",
"gatsby-plugin-google-analytics": "^1.0.4",
"gatsby-plugin-manifest": "^1.0.4",
"gatsby-plugin-netlify": "^1.0.2",
"gatsby-plugin-netlify": "^1.0.4",
"gatsby-plugin-offline": "^1.0.4",
"gatsby-plugin-react-helmet": "^1.0.3",
"gatsby-plugin-react-next": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion www/src/components/LayoutHeader/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const Header = ({location}) => (
<HeaderLink
isActive={location.pathname.includes('/blog')}
title="Blog"
to="/blog.html"
to="/blog/"
/>
</nav>

Expand Down
8 changes: 1 addition & 7 deletions www/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ class Template extends Component {
render() {
const {children, location} = this.props;

// HACK
// https://github.com/gatsbyjs/gatsby/issues/2180
const childrenParams = typeof window === 'undefined'
? {location}
: undefined;

// TODO - is there a better way to check if we need we have a sidebar?
let layoutHasSidebar = false;
if (location.pathname.match(/^\/(docs|tutorial|community|blog)/)) {
Expand Down Expand Up @@ -73,7 +67,7 @@ class Template extends Component {
marginTop: 40,
},
}}>
{children(childrenParams)}
{children()}
</Flex>
<Footer layoutHasSidebar={layoutHasSidebar} />
</div>
Expand Down
30 changes: 22 additions & 8 deletions www/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,14 @@ fs-extra@^4.0.1:
jsonfile "^3.0.0"
universalify "^0.1.0"

fs-extra@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-readdir-recursive@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560"
Expand Down Expand Up @@ -3374,13 +3382,13 @@ gatsby-plugin-manifest@^1.0.4:
babel-runtime "^6.26.0"
bluebird "^3.5.0"

gatsby-plugin-netlify@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/gatsby-plugin-netlify/-/gatsby-plugin-netlify-1.0.3.tgz#eaf241f181b88d75f21b023406b1918db10d4019"
gatsby-plugin-netlify@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/gatsby-plugin-netlify/-/gatsby-plugin-netlify-1.0.4.tgz#8ed9ff783f652187df9462c767518eda89147a65"
dependencies:
babel-runtime "^6.26.0"
fs-extra "^4.0.2"
lodash "^4.17.4"
pify "3.0.0"
webpack-assets-manifest "^1.0.0"

gatsby-plugin-offline@^1.0.4:
Expand Down Expand Up @@ -4884,6 +4892,12 @@ jsonfile@^3.0.0:
optionalDependencies:
graceful-fs "^4.1.6"

jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
optionalDependencies:
graceful-fs "^4.1.6"

jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
Expand Down Expand Up @@ -6244,14 +6258,14 @@ pez@1.x.x:
hoek "2.x.x"
nigel "1.x.x"

pify@3.0.0, pify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"

pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

pify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"

pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
Expand Down

0 comments on commit 2b5c61e

Please sign in to comment.