Skip to content

Create derivate csvs for collections instead of editing user-generated ones. #72

@bmschmidt

Description

@bmschmidt

Is your feature request related to a problem? Please describe.

When debugging an issue in a site, it's important to be able to start over from a clean slate. 'wax:clobber' generally allows this, but as @mnyrop notes in the issue creating it, #46, it doesn't eliminate columns that have been added to _data/{collection}.csv. So if you want to actually do a clean install, you need to maintain a backup copy of your csv and start copying it into _data.

Describe the solution you'd like
That wax overwrites a user-created file with an altered version makes me squeamish. I don't know Jekyll, but every static system I've used maintains a bright line between user generated files and program-generated ones. Like, you would never script something that adds new lines to _config.yml as part of a build process? I can't see a clearcut case where this would be disastrous, but it's nice, for instance, to have the modification date on the data csv be the date that the user actually edited it, not the last time they ran a wax build that updated it.

So just have a file at like _{collection}/{collection}.csv that wax creates which is the user csv from _data/{collection}.csv but with the columns order,layout,collection,thumbnail,full,manifest, and whatever else you're creating added.

Describe alternatives you've considered

Leave it as is? I don't know what you're thinking of to allow this to get clobbered.
I've occasionally used a solution of having something called catalog_derived.json in the same folder, but using the collection folder seems more robust to me.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions