Skip to content

Commit

Permalink
[gatsby-transformer-remark] Update readme (gatsbyjs#3062)
Browse files Browse the repository at this point in the history
- Correct old readme API reference ('headers') to current ('headings')
  - Add example in readme for accessing headings with GraphQL
  • Loading branch information
craigmcginley authored and KyleAMathews committed Nov 29, 2017
1 parent 3d91b96 commit 6f256ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatsby-transformer-remark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ All frontmatter fields are converted into GraphQL fields. TODO link to docs on
auto-inferring types/fields.

This plugin adds additional fields to the `MarkdownRemark` GraphQL type
including `html`, `excerpt`, `headers`, etc. Other Gatsby plugins can also add
including `html`, `excerpt`, `headings`, etc. Other Gatsby plugins can also add
additional fields.

## How to query
Expand All @@ -48,6 +48,10 @@ A sample GraphQL query to get MarkdownRemark nodes:
edges {
node {
html
headings {
depth
value
}
frontmatter {
# Assumes you're using title in your frontmatter.
title
Expand Down

0 comments on commit 6f256ad

Please sign in to comment.