I’m trying to get up and running with Netlify CMS using Jekyll and nested collections.
I’ve thus far re-organized our existing content to be contained to folders according to their slug – e.g. _support/component/how-to-article/index.md .The only roadblock at this point in time is how to have the path set dynamically, based on the slug of the article title , as it’s typed into the editor – similar to this path preview here: https://github.com/netlify/netlify-cms/pull/2897#issuecomment-557940611 – for newly-created articles.
Otherwise, the path field has to be manually exposed, and the user has to type in the folder name manually – which can lead to discrepancies, and is undesirable for the intended use case, which is simplifying the workflow of creating KB articles – not adding extra complexity.
Additionally, it does not appear that {{slug}} is able to be specified for the index_file within the meta parameter.
I’d appreciate any guidance on this as me and my team have been struggling to figure this one out for a while now!
Thanks for the response @erez! Previously, our content was organized to where one folder may contain either one or more .md files, and/or nested folders which then contained the same structure. Take our troubleshooting folder under _support, for example:
In order to reach our current equilibrium – I created a script to create a directory for each .md file, and then place that file within the created folder. The resulting file/directory structure being as follows:
(The filenames could as easily be changed to index.md, but, it didn’t seem to make a difference in our testing.)
Based on the structure of our content, though – it sounds like the latter would be our only option, in lieu of re-organizing such that we don’t have a mix of entries at different levels, as per the latter example.
Is this assumption accurate? And, is there any other way we could be approaching this you think?