diff --git a/docs/tutorial/part-five/index.md b/docs/tutorial/part-five/index.md index d36ea302e58c3..1387b14c3bc44 100644 --- a/docs/tutorial/part-five/index.md +++ b/docs/tutorial/part-five/index.md @@ -108,10 +108,11 @@ created: ```jsx{4} import React from "react" +import Layout from "../components/layout" export default ({ data }) => { console.log(data) - return
We're the only site running on your computer dedicated to showing the best photos and videos of pandas eating lots of food.
-You can now view gatsby-starter-hello-world in the browser
[http://localhost:8000](http://localhost:8000). Open that address in your
browser and...
![Gatsby.js hello world](hello-world.png)
@@ -150,7 +150,7 @@ First create the link to the new page.
To do that, import the `` component from the `gatsby` package that
was installed along with the starter.
-Unlike the normal HTML `` element, Gatsby's `Link` component uses `to` for
+Unlike the normal HTML `` element, Gatsby's `Link` component uses the "`to`" prop for
specifying the page you want to link to. Let's link to a page with the pathname
of `/page-2/`. Try adding that. Once you're done, the page component should look
like:
@@ -204,10 +204,10 @@ _Challenge_: Using the instructions above as hints, see if you can create a thir
## Interactive page
-One nice thing about using Gatsby for building websites vs. other tools is that itʼs easier to add interactivity to your pages. React.js was designed for
+One nice thing about using Gatsby for building websites vs. other tools is that itʼs simple to add interactivity to your pages. Since Gatsby uses React for everything, it's no extra setup work to go beyond normal content templates to rich client interactivity. React excels at building applications as it was designed for
Facebook.com and is used on many other world-class web applications.
-Let's see how to add interactive elements to our pages. Let's start with a counter.
+Let's see how to add interactivity to our pages. Let's start with a counter.
We'll start by creating a new link to a page at `/counter`/ from our original
`index.js` page component `Counter`.
@@ -304,7 +304,7 @@ We're now rendering the current count from the component state.
Let's now change the state when we click on our buttons.
-```jsx{14-19}
+```jsx{14-31}
import React from "react"
class Counter extends React.Component {
@@ -318,11 +318,23 @@ class Counter extends React.Component {
current count: {this.state.count}
-{node.excerpt}
-{node.excerpt}
+What do I like to do? Lots of course but definitely enjoy building   websites.
+CSS Modules are cool
- +CSS Modules are cool
Want to help keep this information complete, accurate, and up-to-date? Please comment{` `} - + here.
diff --git a/www/src/pages/index.js b/www/src/pages/index.js index 95010c623a4a9..9ddd1c8477bc2 100644 --- a/www/src/pages/index.js +++ b/www/src/pages/index.js @@ -1,15 +1,12 @@ import React from "react" -import { Link } from "gatsby" +import { OutboundLink } from "gatsby-plugin-google-analytics" import Layout from "../layouts" import presets, { colors } from "../utils/presets" -import { rhythm, scale, options } from "../utils/typography" -import { JSIcon, WebpackIcon, ReactJSIcon, GraphQLIcon } from "../assets/logos" -import { vP, vPHd, vPVHd, vPVVHd } from "../components/gutters" +import { rhythm } from "../utils/typography" +import { WebpackIcon, ReactJSIcon, GraphQLIcon } from "../assets/logos" import Container from "../components/container" -import MastheadContent from "../components/masthead" import MastheadBg from "../components/masthead-bg" -import UsedBy from "../components/used-by" import Cards from "../components/cards" import Card from "../components/card" import CardHeadline from "../components/card-headline" diff --git a/www/src/pages/tutorial.js b/www/src/pages/tutorial.js deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/www/src/templates/template-docs-markdown.js b/www/src/templates/template-docs-markdown.js index a6300b616db41..b1e1c7362d224 100644 --- a/www/src/templates/template-docs-markdown.js +++ b/www/src/templates/template-docs-markdown.js @@ -69,8 +69,8 @@ class DocsTemplate extends React.Component { export default DocsTemplate export const pageQuery = graphql` - query TemplateDocsMarkdown($slug: String!) { - markdownRemark(fields: { slug: { eq: $slug } }) { + query TemplateDocsMarkdown($path: String!) { + markdownRemark(fields: { slug: { eq: $path } }) { html excerpt timeToRead diff --git a/www/src/utils/typography.js b/www/src/utils/typography.js index 051c34e6b9f0e..ec0e9ef9e372f 100644 --- a/www/src/utils/typography.js +++ b/www/src/utils/typography.js @@ -78,7 +78,7 @@ const _options = { hr: { backgroundColor: colors.ui.light, }, - "tt,code": { + "tt,code,kbd": { // background: `hsla(23, 60%, 97%, 1)`, background: colors.a[0], fontFamily: options.monospaceFontFamily.join(`,`),