3.0.2 • Published 4 months ago

gatsby-plugin-readingtime v3.0.2

Weekly downloads
14
License
MIT
Repository
github
Last release
4 months ago

npm

gatsby-plugin-readingtime

Get reading time estimates for any content from any source in your Gatsby project's GraphQL schema.

Install

npm i gatsby-plugin-readingtime

yarn add gatsby-plugin-readingtime

config

{
  plugins: [
    {
      resolve: `gatsby-plugin-readingtime`,
      options: {
        config: {
          // configuration for reading-time package https://github.com/ngryman/reading-time
        },
        types: {
          // Key: GraphQL Type to add reading times to, Value: Resolver function takes source node of Defined GraphQL type and returns content to be processed.
          WpPost: source => {
            const { blocks } = source;
            return blocks.map(block => block.saveContent).join('');
          },
        },
      },
    },
  ]
}
3.0.2

4 months ago

2.2.1

2 years ago

3.0.1

1 year ago

3.0.0

1 year ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago