Gatsby: Blazing-fast static site generator for React
Source plugins
1
| yarn add gatsby-source-filesystem
|
Then add it to your gatsby-config.js:
1 2 3 4 5 6 7 8 9 10 11
| module.exports = { plugins: [ { resolve: `gatsby-source-filesystem`, options: { name: `src`, path: `${__dirname}/src/`, }, }, ], }
|
graphQL
1 2 3 4 5 6 7 8 9 10 11 12 13
| { allFile { edges { node { id relativePath prettySize extension birthTime(fromNow: true) } } } }
|
1
| yarn add gatsby-transformer-remark
|
Then add it to the gatsby-config.js.
1 2 3 4 5
| module.exports = { plugins: [ `gatsby-transformer-remark`, ], }
|
graphQL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| { allMarkdownRemark(sort: {fields: [frontmatter___date], order: DESC}) { totalCount edges { node { frontmatter { title date } excerpt html timeToRead } } } }
|