Netlify-cms: Automatic configuration

Created on 28 May 2019  路  6Comments  路  Source: netlify/netlify-cms

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

This is half stub, half umbrella issue (epic). In a nutshell, developers spend time configuring their static site generator and setting up their site, and _then_ have to configure Netlify CMS separately. There's often a lot of overlap, resulting in doubled efforts.

Describe the solution you'd like

Netlify CMS should be able to auto detect your SSG and infer some things based on the SSG config file.

Describe alternatives you've considered

A Config UI can help by making config creation less arduous, but it still falls short of the simplicity that auto-config would afford. That said, a Config UI is a prerequisite for this functionality - auto config will make things incredibly easy, but when it doesn't do the right thing, adjustments really need to be obvious and correctable without opening a raw yaml file in your git repo.

Issues

  • [ ] #2332
epic

Most helpful comment

I don't know if this helps someone, but I've made an external tool to edit the config file.

Here it is, hope this helps someone :)
https://netlify-config-builder.marcossi.com/

It's an open source project hosted on https://github.com/Kinark/netlify-config-builder

All 6 comments

Tall order for sure.

I have been considering content layout lately and it was apparent that the biggest issue goes down to what the SSG can configure. I am not sure how possible it would be to create an automatic configuration in the cms without some input from the user. Whether that comes in the form of a cli or a smart screen setup that would spin it up and output the config or both.

Note: In Gatsby, I have been contemplating a source plugin to configure graphQL queries based on the config.yml, so you don't have to worry about missing fields in your front matter, because the source plugin would create the schema for you and define those fields for query whether they exist or not. This method also opens up thought about creating data schema check scripts in netlify-cms that would allow you to run a check whether your site is setup correctly (missing data fields, missing directory collections, and others).

Yep, mileage will vary by SSG, and by a site's complexity. I'm hoping we can do a decent job inferring config for new projects straight from the browser using SSG-specific extensions, hard to say for sure without some experimentation. But that's definitely the goal.

This is definitely something that this CMS needs. I just wrote a 250-line config file manually. Forestry CMS somehow does this, or something close to it.

Even semi-automatic config file generation would be very useful.

Forestry made what I believe was a very wise decision early on - narrowing their scope to only support specific static site generators. This allowed them to focus on solid support for those tools. As an open source project, I think being SSG agnostic was the right move, but we need to do better for the tools most of our users run. Automatic configuration can be a per-SSG feature, perhaps being implemented at the integration layer (Eg. gatsby-plugin-netlify-cms).

Sent with GitHawk

I don't know if this helps someone, but I've made an external tool to edit the config file.

Here it is, hope this helps someone :)
https://netlify-config-builder.marcossi.com/

It's an open source project hosted on https://github.com/Kinark/netlify-config-builder

Thanks for sharing this @Kinark. This is exactly what I'm looking for!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dur41d picture dur41d  路  3Comments

BerkeleyTrue picture BerkeleyTrue  路  3Comments

emckay picture emckay  路  3Comments

ciokan picture ciokan  路  3Comments

papandreou picture papandreou  路  3Comments