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

Reduce duplication between Netlify CMS config and schema files #205

Open
timwis opened this issue Nov 16, 2022 · 1 comment
Open

Reduce duplication between Netlify CMS config and schema files #205

timwis opened this issue Nov 16, 2022 · 1 comment

Comments

@timwis
Copy link
Owner

timwis commented Nov 16, 2022

We already have schemas defined (for datasets, resources, and categories) in _data/schemas/default.yml. See #60 for background.

Configuring Netlify CMS results in quite a lot of duplication here (e.g. Netlify CMS' config.yml vs our existing schema file). That's probably okay for an MVP, but ideally we'd consolidate them, to avoid them getting out of sync.

One thought I had was to have Jekyll run Netlify CMS' config.yml file through its template engine (by adding double --- at the top). This would allow us to effectively generate the collection configuration. But there are some Netlify CMS specific fields that we'd then have to move into the existing schema file. (As an aside, there's also the issue that Netlify CMS uses {{squiggly brackets}} for certain fields like summary). Haven't thought about it much more beyond that yet, but would love to hear thoughts.

@timwis timwis added this to the Netlify CMS milestone Nov 16, 2022
@timwis
Copy link
Owner Author

timwis commented Nov 18, 2022

I've started adding some Jekyll variables to the config via JavaScript in index.html. That might help a bit, but probably doesn't resolve the problem described above.

@timwis timwis removed this from the Netlify CMS milestone Jan 13, 2023
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

No branches or pull requests

1 participant