-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(www) Split up docs and blog page creation #21323
Comments
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Description
Split up the logic for creating pages for docs and blogs.
Motivation
Both docs and blog posts are MDX files with the same source, but they usually have different logic associated with them, leading to a lot of branched paths and queries based on path.
Relying on
allMdx
for all these queries makes it hard to reason about and prone to error, since other sources may also have MDX (for example, we're potentially creating duplicate package READMEs here.Steps
Once #21217 is merged, split utils/node/docs.js into two files: docs.js and blog.js.
In docs.js:
onCreateNode
should find MDX or markdown files that have aabsoluteFilePath
ofdocs
(or the translation sourcesgatsby-{lang}
and create a new child nodeDocPage
.createPage
and the docs template, should queryallDocPage
ordocPage
instead ofallMdx
.In blog.js:
onCreateNode
should find MDX or markdown files that are have anabsoluteFilePath
ofblog
and create a new child nodeBlogPage
.createPage
and the blog templates/pages, should queryallBlogPost
orblogPost
instead ofallMdx
/mdx
.Related Issues and PRs
Part of: #19105
Depends on: #21217
The text was updated successfully, but these errors were encountered: