Refactor/gatsby node modularization
Description
refactor/gatsby-node-modularization-issue-5 --title "[gatsby-node] Modularize createPages handlers for blog, Kanvas labs, and Sistent" --body "Description
Closes : #7615
This PR modularizes targeted parts of gatsby-node.js to reduce merge conflicts and improve maintainability.
What changed
- Added
src/node-api/createBlogPages.jsfor blog post, category, and tag page creation. - Added
src/node-api/createKanvasLabPages.jsfor Kanvas lab page creation. - Added
src/node-api/createSistentComponentPages.jsfor Sistent component page creation. - Updated
gatsby-node.jsto orchestrate these handlers through dependency injection (graphql,createPage,reporter, templates/helpers). - Removed the extracted GraphQL fragments and page-creation loops from the monolithic
createPagesexport.
Scope control
- Only issue-relevant areas were refactored (blog/category/tags, kanvas-labs, sistent).
- No unrelated routing behavior, templates, or node lifecycle APIs were modified.
Validation
- Attempted targeted lint on changed files:
npx eslint gatsby-node.js src/node-api/createBlogPages.js src/node-api/createKanvasLabPages.js src/node-api/createSistentComponentPages.js
- Lint execution is currently blocked in this environment due to missing local dependency:
Cannot find module 'globals'fromeslint.config.js.
Notes for Reviewers
- Functional behavior for extracted pages is preserved (same path patterns and page context).
gatsby-node.jsnow acts as a cleaner orchestrator for these concerns.
- [x] Yes, I signed my commits.
@rishiraj38 can you please review this pr
Why are these commits included in this PR?
Why are these commits included in this PR?
@rishiraj38 actually i forgot to checkout master during creating current branch , but i reverted that part .
Preview deployment for PR #7622 removed.
This PR preview was automatically pruned because we keep only the 6 most recently updated previews on GitHub Pages to stay within deployment size limits.
If needed, push a new commit to this PR to generate a fresh preview.
@Manishnemade12 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would :slightly_smiling_face:
Why are these commits included in this PR?