Skip to content

Chore: improve build speed; exclude unnecessary image processing#7476

Merged
leecalcote merged 1 commit intomasterfrom
work/kind-sanderson
Mar 10, 2026
Merged

Chore: improve build speed; exclude unnecessary image processing#7476
leecalcote merged 1 commit intomasterfrom
work/kind-sanderson

Conversation

@leecalcote
Copy link
Copy Markdown
Member

Description

This PR fixes #

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Copilot AI review requested due to automatic review settings March 10, 2026 14:45
Copy link
Copy Markdown
Contributor

@fitzergerald fitzergerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Gatsby schema and filesystem sourcing to reduce build work by explicitly typing new frontmatter image fields and excluding selected image paths from being sourced/processed.

Changes:

  • Added GraphQL schema types/fields for additional frontmatter image references.
  • Reformatted RSS/feed-related code for readability (no functional change intended).
  • Expanded gatsby-source-filesystem ignore globs to skip SVGs and several image subdirectories.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
gatsby-node.js Adds new frontmatter schema types/fields for image/file resolution.
gatsby-config.js Refactors some formatting and expands image sourcing ignore globs to reduce build workload.

Comment thread gatsby-node.js
Comment on lines +866 to +869
type FrontmatterMeshesYouLearn {
name: String
imagepath: File @fileByRelativePath
}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imagepath is inconsistent with nearby frontmatter naming patterns in this schema (e.g., image_path, executive_image, thumbnail_svg). If you can still change the frontmatter shape, consider renaming this field to match the prevailing convention (snake_case like image_path or a consistent camelCase) to keep the GraphQL API self-explanatory and reduce confusion for query authors.

Copilot generated this review using guidance from repository custom instructions.
Comment thread gatsby-node.js
image_path: File @fileByRelativePath
thumbnail_svg: File @fileByRelativePath
darkthumbnail_svg: File @fileByRelativePath
meshesYouLearn: [FrontmatterMeshesYouLearn]
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imagepath is inconsistent with nearby frontmatter naming patterns in this schema (e.g., image_path, executive_image, thumbnail_svg). If you can still change the frontmatter shape, consider renaming this field to match the prevailing convention (snake_case like image_path or a consistent camelCase) to keep the GraphQL API self-explanatory and reduce confusion for query authors.

Copilot generated this review using guidance from repository custom instructions.
Comment thread gatsby-config.js
Comment on lines +17 to +19
collectionIgnoreGlobs.length > 0
? console.info(`Build Scope excludes: "${process.env.BUILD_FULL_SITE}"`)
: console.info("Build Scope includes all collections");
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses a ternary for side effects as a standalone statement. In addition to being harder to read, it can trip no-unused-expressions-style lint rules in some ESLint configs. Prefer an explicit if/else (and keep statement terminators consistent) for clearer intent and more robust linting.

Suggested change
collectionIgnoreGlobs.length > 0
? console.info(`Build Scope excludes: "${process.env.BUILD_FULL_SITE}"`)
: console.info("Build Scope includes all collections");
if (collectionIgnoreGlobs.length > 0) {
console.info(`Build Scope excludes: "${process.env.BUILD_FULL_SITE}"`);
} else {
console.info("Build Scope includes all collections");
}

Copilot uses AI. Check for mistakes.
Comment thread gatsby-config.js
Comment on lines +506 to +516
ignore: [
"**/*.svg",
"**/learning-path/**",
"**/service-mesh-icons/**",
"**/app/**",
"**/learn-layer5/**",
"**/careers/**",
"**/callout/**",
"**/sistent/**",
"**/whiteboard/**",
],
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignore list is sizable and embedded inline, which makes it easier to accidentally add duplicates or lose track of the rationale for each entry. Consider extracting these patterns into a named constant (e.g., IMAGE_SOURCE_IGNORE_GLOBS) with a short comment explaining the criteria for exclusion (e.g., “excluded because not queried via GraphQL / not worth Sharp processing”) to keep future edits safer.

Copilot uses AI. Check for mistakes.
@leecalcote leecalcote merged commit 0133245 into master Mar 10, 2026
2 of 4 checks passed
@leecalcote leecalcote deleted the work/kind-sanderson branch March 10, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants