Component Partials #5917
Replies: 2 comments 1 reply
-
I understand the frustration here. I would end up voting against this idea to keep things simple in the parsing of the YAML config. But I'm not going to leave you hanging here. Option 1: When I have a project with a large config with duplicated information, I use the "manual config" and build my config object using the JSON objects instead where I can import in common objects. Option2: If the manual configuration and javascript setup doesn't fit your SSG page load scenario, you can always build the JSON config files and write a script to convert the JSON object to a YAML (config.yml) using a pre-publish script. This is something a developer could do using your suggested config above also. The push back would be to keep the config processing simple in core netlify-cms and resist complicating a yaml config. Look forward to hearing other opinions that might change my view. |
Beta Was this translation helpful? Give feedback.
-
Thanks @talves, that's great input. Linking #1342 for context as this was discussed in that issue as well. |
Beta Was this translation helpful? Give feedback.
-
I've been using Netlify CMS to build page layouts for a client recently and I really am enjoying how simple and powerful this basic CMS is. However, as I've been building complicated collections I have ran into a few limitations where I think things could be improved.
I have several collections that have common components (ie: a landing page has a gallery and so does a service page for example). It would be awesome if we could load in yml partials rather than duplicating common configuration.
Here is an example of what I'm thinking...
Possible Folder Structure:
config.yml -- /components/heading.yml -- /components/gallery.yml
Possible Yaml Structure:
Beta Was this translation helpful? Give feedback.
All reactions