Skip to content

Conversation

@ONKARBH
Copy link

@ONKARBH ONKARBH commented Mar 25, 2025

"As requested, moving Eleventy configuration fixes to a separate PR."

@ceph-jenkins
Copy link

Can one of the admins verify this patch?

eleventyConfig.addCollection('primary', require(`${collectionsDir}/primary.js`));
eleventyConfig.addCollection('sitemap', require(`${collectionsDir}/sitemap.js`));
const collectionsDir = './src/_11ty/collections';
eleventyConfig.addCollection('primary', requireIfExists(`${collectionsDir}/primary.js`));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is requireIfExists necessary if it's in the main code base?

@Thingee
Copy link
Contributor

Thingee commented Mar 27, 2025

More information on why these are errors in the commit message would be helpful for future reference.

@Thingee
Copy link
Contributor

Thingee commented Mar 27, 2025

I was able to verify that around line 161 helps with issue #748.

@ONKARBH any other errors you can note in the PR would be helpful.

@ONKARBH
Copy link
Author

ONKARBH commented Mar 28, 2025

More information on why these are errors in the commit message would be helpful for future reference.

  • Used requireIfExists to prevent errors if the specified collection file is missing.
  • This ensures that the site does not break during the build process if a collection is not available.
  • Verified that these changes help resolve issue Unable To Run Site Locally #748, allowing the site to run locally without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants