Gridsome GraphQL not returning posts

82 views Asked by At

I'm trying to create a simple blog for my site using local markdown. To my knowledge I've followed the Gridsome docs to accomplish this, but queries don't return any posts. I have installed source-filesystem and transformer remark.

module.exports = {
  siteName: 'My Blog',

  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: './content/posts/**/*.md',
        typeName: 'Post',
      }
    }
  ],
}

My markdown files are in the content/posts folder, but when I use the GraphQL explorer it returns 0 for allPosts totalCount. Similarly, just making a <page-query> returns an error. Any help would be much appreciated.

0

There are 0 answers