Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Migrated dependency: metalsmith-collections #17

Open
emmercm opened this issue Feb 21, 2023 · 5 comments
Open

Migrated dependency: metalsmith-collections #17

emmercm opened this issue Feb 21, 2023 · 5 comments

Comments

@emmercm
Copy link

emmercm commented Feb 21, 2023

metalsmith-auto-collections currently depends on metalsmith-collections@^0.9.0, but it has been moved to @metalsmith/collections with Kevin Van Lierde's recent stewardship. The old metalsmith-collections isn't receiving updates anymore.

@lowmess
Copy link
Owner

lowmess commented Mar 21, 2023

@emmercm appreciate the issue! unfortunately, i no longer use metalsmith on any projects, and can't dedicate the time to ensuring this plugin is up-to-date. i'm more than happy to transfer this repo and the npm package to someone more involved with the project that has capacity (not that it's very high maintenance). i'll try to find time in the next few weeks to get dependencies and whatnot up-to-date if no one else is able.

@emmercm
Copy link
Author

emmercm commented Mar 27, 2023

Hi @lowmess, I could potentially take it over, though I'd probably merge it into my https://github.com/emmercm/metalsmith-plugins monorepo.

Or maybe @webketje could be interested?

@webketje
Copy link

@emmercm thx for the ping, but I feel like the functionality provided by this plugin is easy enough to achieve with @metalsmith/collections stand-alone:

metalsmith.use(collections({
  news: 'news/*',
  gallery: 'gallery/*',
  services: 'services/*',
})

More advanced use cases open up the floodgates for edge cases with collection naming collisions due to nested folder structures.
So I rather leave this up to the user but it can definitely be done with just @metalsmith/collections (including nested folders with eg 'mydir/**/*.{ext1,ext2,ext3}' type globs).

What I would explore is adding the capability to @metalsmith/collections to target files based on keys (like permalinks' { match: { key: 'value' }) so that you could use eg metalsmith-paths to attach the parent dir name to the file and then create a collection out of it using { match: { 'path.dir': 'mydir' }} essentially reaching the same result as using auto-collections

@emmercm
Copy link
Author

emmercm commented Mar 27, 2023

@webketje my usage of this project is some of the oldest Metalsmith code I have, so it's likely I reached for something that had better documentation at the time - or I'm also not tracking how @metalsmith/collections has evolved over time.

There's nothing that jumps out to me about this usage that couldn't be accomplished with @metalsmith/collections as it is today: https://github.com/emmercm/www/blob/bac9e17c044ee19324b19026d8f4bc483ca1f8b7/index.js#L409-L423

@lowmess maybe it would make sense to redirect people to the newest package if/when you deprecate this one.

@lowmess
Copy link
Owner

lowmess commented Mar 29, 2023

i'll mark this as deprecated with a redirect link both here and on npm this afternoon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants