gh-leokim-github-io

A Default, 140 Character Excerpt

1 min read ·

Contents

This example uses the default pruning method.

gatsby-transformer-remark allows you to get an excerpt from a markdown post. By default, it will prune the first 140 characters, but you can optionally specify a pruneLength in the graphql query.

{
  allMarkdownRemark {
    edges {
      node {
        excerpt(pruneLength: 280)
      }
    }
  }
}

Daisy Buchanan --

© 2020 @ghleokim, Built with Gatsby