From 101249f4e59234246dad9ceb34d26af72c8e0620 Mon Sep 17 00:00:00 2001 From: Aman Mittal Date: Mon, 8 Jan 2018 19:06:39 +0530 Subject: [PATCH 1/7] add new gatsby-starter project/template/theme (#3436) gatsby-starter-ceevee a single page portfolio --- docs/docs/gatsby-starters.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/docs/gatsby-starters.md b/docs/docs/gatsby-starters.md index e7009ef028075..0410bb82678ef 100644 --- a/docs/docs/gatsby-starters.md +++ b/docs/docs/gatsby-starters.md @@ -298,3 +298,14 @@ Community: * Password Change * Protected Routes with Authorization * Realtime Database with Users + +* [gatsby-starter-ceevee](https://github.com/amandeepmittal/gatsby-starter-ceevee) [(demo)](http://gatsby-starter-ceevee.surge.sh/) + +Features: + +* Based on the Ceevee site template, design by [Styleshout](https://www.styeshout.com/) +* Single Page Resume/Portfolio site +* Target audience Developers, Designers, etc. +* Used CSS Modules, easy to manipulate +* FontAwsome Library for icons +* Responsive Design, optimized for Mobile devices From bfe57752c0dcd2a641b564c868b51fb04646a209 Mon Sep 17 00:00:00 2001 From: Cody Winton Date: Mon, 8 Jan 2018 07:37:15 -0600 Subject: [PATCH 2/7] Changed Random Photo Source (#3419) lorempixel.com was giving me some issues and Unsplash.com has great photos. --- docs/tutorial/part-one/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/part-one/index.md b/docs/tutorial/part-one/index.md index b9387fc1db17c..a46e91cba0d9a 100644 --- a/docs/tutorial/part-one/index.md +++ b/docs/tutorial/part-one/index.md @@ -134,7 +134,7 @@ export default () =>

Hello Gatsby!

What a world.

- +
``` @@ -166,7 +166,7 @@ export default () =>

Hello Gatsby!

What a world.

- +
Link @@ -222,7 +222,7 @@ export default () =>

Hello Gatsby!

What a world.

- +
Link From 2e348fd0b9be0f3534d3957a15a96dbc5635893f Mon Sep 17 00:00:00 2001 From: Marco Biedermann Date: Mon, 8 Jan 2018 14:50:03 +0100 Subject: [PATCH 3/7] add gatsby-plugin-svg-sprite (#3355) --- docs/docs/plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/plugins.md b/docs/docs/plugins.md index 800e5c540e4fc..15f78ebdc0504 100644 --- a/docs/docs/plugins.md +++ b/docs/docs/plugins.md @@ -148,6 +148,7 @@ root. * [gatsby-plugin-segment-js](https://github.com/benjaminhoffman/gatsby-plugin-segment-js) * [gatsby-plugin-stripe-checkout](https://github.com/njosefbeck/gatsby-plugin-stripe-checkout) * [gatsby-plugin-stripe-elements](https://github.com/njosefbeck/gatsby-plugin-stripe-elements) +* [gatsby-plugin-svg-sprite](https://github.com/marcobiedermann/gatsby-plugin-svg-sprite) * [gatsby-plugin-svgr](https://github.com/zabute/gatsby-plugin-svgr) * [gatsby-plugin-typescript-css-modules](https://github.com/jcreamer898/gatsby-plugin-typescript-css-modules) * [gatsby-plugin-yandex-metrika](https://github.com/viatsko/gatsby-plugin-yandex-metrika) From a71848d576fd8678a68af8888dae4b528c9cc662 Mon Sep 17 00:00:00 2001 From: Adrien HARNAY Date: Mon, 8 Jan 2018 14:56:02 +0100 Subject: [PATCH 4/7] [Documentation] Conditional rendering in templates (#3430) * Document conditional rendering in templates * fix wording * Update building-with-components.md * Format --- docs/docs/building-with-components.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/docs/building-with-components.md b/docs/docs/building-with-components.md index c523c4d238b50..4d5acd7f321ce 100644 --- a/docs/docs/building-with-components.md +++ b/docs/docs/building-with-components.md @@ -124,6 +124,9 @@ export const pageQuery = graphql` `src/layouts/index.jsx` (optional) wraps page components. You can use it for portions of pages that are shared across pages like headers and footers. +You can use the `location` prop to render conditionally based on the page +URL. + Example: ```jsx @@ -132,7 +135,11 @@ import Navigation from "../components/Navigation/Navigation.jsx"; export default class Template extends React.Component { render() { - return {this.props.children()}; + if (this.props.location.pathname !== "/") { + return {this.props.children()}; + } else { + return this.props.children(); + } } } ``` From ff9a4c1b201e81fa0f7d213600401d8255e141b0 Mon Sep 17 00:00:00 2001 From: Florian Kissling Date: Mon, 8 Jan 2018 14:56:51 +0100 Subject: [PATCH 5/7] Add gatsby-plugin-canonical-urls to docs/plugins, fixes #3403 (#3404) --- docs/docs/plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/plugins.md b/docs/docs/plugins.md index 15f78ebdc0504..fb5cb0a9ebfbb 100644 --- a/docs/docs/plugins.md +++ b/docs/docs/plugins.md @@ -76,6 +76,7 @@ root. ## Official plugins +* [gatsby-plugin-canonical-urls](/packages/gatsby-plugin-canonical-urls/) * [gatsby-plugin-catch-links](/packages/gatsby-plugin-catch-links/) * [gatsby-plugin-create-client-paths](/packages/gatsby-plugin-create-client-paths/) * [gatsby-plugin-coffeescript](/packages/gatsby-plugin-coffeescript/) From eeea4573d1c900b0d35efdc73799a278b609bf0b Mon Sep 17 00:00:00 2001 From: tomazy Date: Mon, 8 Jan 2018 08:58:04 -0500 Subject: [PATCH 6/7] Remove render-page.js.map from public folder (#3326) This file is not required in production and it may leak too much information about the folder structure and/or user name --- packages/gatsby/src/commands/build-html.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gatsby/src/commands/build-html.js b/packages/gatsby/src/commands/build-html.js index 2ebd8d3bd3b14..aba29d71de0ae 100644 --- a/packages/gatsby/src/commands/build-html.js +++ b/packages/gatsby/src/commands/build-html.js @@ -44,6 +44,7 @@ module.exports = async (program: any) => { // Remove the temp JS bundle file built for the static-site-generator-plugin try { fs.unlinkSync(outputFile) + fs.unlinkSync(`${outputFile}.map`) } catch (e) { // This function will fail on Windows with no further consequences. } From f19fc2a03f539b9f640bf8512839210d7dd0364a Mon Sep 17 00:00:00 2001 From: Ariel Gerstein Date: Mon, 8 Jan 2018 10:58:43 -0300 Subject: [PATCH 7/7] Update canonical url when navigating to another page (#3405) --- packages/gatsby-plugin-canonical-urls/src/gatsby-browser.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 packages/gatsby-plugin-canonical-urls/src/gatsby-browser.js diff --git a/packages/gatsby-plugin-canonical-urls/src/gatsby-browser.js b/packages/gatsby-plugin-canonical-urls/src/gatsby-browser.js new file mode 100644 index 0000000000000..e1102c3cd87ec --- /dev/null +++ b/packages/gatsby-plugin-canonical-urls/src/gatsby-browser.js @@ -0,0 +1,4 @@ +exports.onRouteUpdate = ({ location }) => { + const domElem = document.querySelector(`link[rel='canonical']`) + domElem.setAttribute(`href`, `${window.location.origin}${location.pathname}`) +}