Open i001962 opened 6 years ago
I believe the Tag-Page template could should use an additional filter.
https://github.com/fabien0102/gatsby-starter/blob/df1edf08e0b420c91a9bc31cd281da4d9ef12be3/src/templates/tags-page.tsx#L9
Proposed to be:
# Get tags tags: allMarkdownRemark(filter: {frontmatter: {draft: {ne: true}}, fileAbsolutePath: {regex: "/blog/"}}) { group(field: frontmatter___tags) { fieldValue totalCount } }
This is needed if you have a markdown file in a folder other than blog and that file has tags in the frontmatter. This could possibly be resolved for in gatsby-node.js too.
Also, the same type of filter could be added here
https://github.com/fabien0102/gatsby-starter/blob/df1edf08e0b420c91a9bc31cd281da4d9ef12be3/src/pages/blog.tsx#L103
fileAbsolutePath: {regex: "/blog/"}
I believe the Tag-Page template could should use an additional filter.
https://github.com/fabien0102/gatsby-starter/blob/df1edf08e0b420c91a9bc31cd281da4d9ef12be3/src/templates/tags-page.tsx#L9
Proposed to be:
This is needed if you have a markdown file in a folder other than blog and that file has tags in the frontmatter. This could possibly be resolved for in gatsby-node.js too.