Hi all,
I am trying to get this specific setup for my gatsby site. I want to have a landing page and a separate blog articles to be inside /blog folder or path. The closest example I found so far is this:
https://github.com/DSchau/gatsby-blog-starter-kit/issues/28
is this possible with Gatsby?
domain.com

domain.com/blog

domain.com/blog/article-1

Here's a tutorial on that if you'll be using markdown for your articles https://www.gatsbyjs.org/tutorial/part-seven/
Basically the idea is, on your gatsby-node.js, you'll be generating pages that has a path with /blog/ as the prefix + the slug of your article.
As mentioned by @daydream05 - this is covered in linked tutorial.
@daydream05 @pieh
I assume you refer to the basePath parameter?
This does NOT seem to work.
@axhamre Please provide more details - and ideally separate issue/question.
Contrary to the veeery long linked article with wrong info, this seems to be how to solve it (see basePath variable), exports.onCreateNode:
createNodeField({
name: `slug`,
node,
value: `/${basePath}${value}`,
})
Most helpful comment
Contrary to the veeery long linked article with wrong info, this seems to be how to solve it (see basePath variable),
exports.onCreateNode: