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

Deduplicate active plugin list when using 'add' option #298

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

gfscott
Copy link
Owner

@gfscott gfscott commented Dec 8, 2024

I spotted someone in the wild with a config object like this:

eleventyConfig.addPlugin(embedEverything, {
  add: ['twitter', 'soundcloud', 'youtube']
});

The original intent behind the add option was to make it easier to activate non-default plugins (of which there's currently only one, soundcloud). I tried it out and discovered that this usage results in twitter and youtube showing up twice in the active plugin list. The effect probably isn't noticeable to the end user but this PR ensures that the list of active plugins is always deduplicated.

@gfscott gfscott self-assigned this Dec 8, 2024
Copy link

changeset-bot bot commented Dec 8, 2024

🦋 Changeset detected

Latest commit: 1fd1ba8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eleventy-plugin-embed-everything Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gfscott gfscott requested a review from Copilot December 8, 2024 19:52

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no suggestions.

@gfscott gfscott merged commit 66e4db6 into main Dec 8, 2024
2 checks passed
@gfscott gfscott deleted the everything-config branch December 8, 2024 20:00
@github-actions github-actions bot mentioned this pull request Dec 8, 2024
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.

1 participant