Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.md #10306

Merged
merged 1 commit into from
Dec 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/tutorial/part-six/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ the following to add a GraphQL query with some initial HTML and styling.
```jsx:title=src/pages/index.js
import React from "react"
import { graphql } from "gatsby"
import { css } from "react-emotion"
import { css } from "@emotion/core"
import { rhythm } from "../utils/typography"
import Layout from "../components/layout"

Expand All @@ -117,7 +117,7 @@ export default ({ data }) => {
<Layout>
<div>
<h1
className={css`
css={css`
display: inline-block;
border-bottom: 1px solid;
`}
Expand All @@ -128,13 +128,13 @@ export default ({ data }) => {
{data.allMarkdownRemark.edges.map(({ node }) => (
<div key={node.id}>
<h3
className={css`
css={css`
margin-bottom: ${rhythm(1 / 4)};
`}
>
{node.frontmatter.title}{" "}
<span
className={css`
css={css`
color: #bbb;
`}
>
Expand Down Expand Up @@ -198,7 +198,7 @@ this powerful set of operators, you can select any data you want—in the format
need.

In your index page's GraphQL query, change `allMarkdownRemark` to
`allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC })`. Save
`allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC })`. _Note: There are 3 underscores between `frontmatter` and `date`._ Save
this and the sort order should be fixed.

Try opening Graph_i_QL and playing with different sort options. You can sort the
Expand Down