You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, a blog post's frontmatter looks a little bit like this:
---path: "/blog/site-welcome"date: "2020-04-16"author: "Ben Silverman"title: "Welcome to our new website!"tags: ["post"]---
with path telling Gatsby at what URL to put the blog post once it's been generated.
I don't really like how the /path/ is included in there, because it means people could put posts at any URL they want on the site, rather than as a sub-page of the blog. I think it should be renamed to be the "slug" of the post (i.e. a unique, kebab-case string which identifies the post and will be used in the URL.
TL;DR: Gatsby should still place all blog posts at /path/{slug} but the /path/ part should be moved to gatsby-node.js and handled at build time.
The text was updated successfully, but these errors were encountered:
Currently, a blog post's frontmatter looks a little bit like this:
with
path
telling Gatsby at what URL to put the blog post once it's been generated.I don't really like how the
/path/
is included in there, because it means people could put posts at any URL they want on the site, rather than as a sub-page of the blog. I think it should be renamed to be the "slug" of the post (i.e. a unique, kebab-case string which identifies the post and will be used in the URL.TL;DR: Gatsby should still place all blog posts at
/path/{slug}
but the/path/
part should be moved togatsby-node.js
and handled at build time.The text was updated successfully, but these errors were encountered: