Skip to content
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

Closed
tesseralis opened this issue Feb 10, 2020 · 4 comments
Closed

(www) Split up docs and blog page creation #21323

tesseralis opened this issue Feb 10, 2020 · 4 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change

Comments

@tesseralis
Copy link
Contributor

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 a absoluteFilePath of docs (or the translation sources gatsby-{lang} and create a new child node DocPage.
  • all places that query MDX looking for docs, such as createPage and the docs template, should query allDocPage or docPage instead of allMdx.

In blog.js:

  • onCreateNode should find MDX or markdown files that are have an absoluteFilePath of blog and create a new child node BlogPage.
  • All places that query MDX looking for blog posts, such as createPage and the blog templates/pages, should query allBlogPost or blogPost instead of allMdx/mdx.

Related Issues and PRs

Part of: #19105
Depends on: #21217

@gatsbot gatsbot bot added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Feb 10, 2020
@tesseralis tesseralis added type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change and removed type: documentation An issue or pull request for improving or updating Gatsby's documentation labels Feb 10, 2020
@github-actions
Copy link

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.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 19, 2020
@github-actions
Copy link

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.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

@wardpeet wardpeet reopened this Mar 31, 2020
@wardpeet wardpeet removed the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 31, 2020
@github-actions
Copy link

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.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Apr 20, 2020
@github-actions
Copy link

github-actions bot commented May 1, 2020

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.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

@github-actions github-actions bot closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

No branches or pull requests

2 participants