Problem/Motivation
One drawback of the content model documentation at this time is that a field or entity has to exist before it can be documented so it prevents documentation from riding along with the code that created the thing to document.
As a site developer it would be nice to be able to create a Content Model Document locally and then be able to export and initialize the import.
The import should not be a sync, only imported once, then maintained as content on the prod instance of Drupal.
Some possibilities:
- Export with a copyable array that could then be pasted into a hook_update_N which would instantiate the document with the initial values. Drawback: this only solves the initial case of creating the document, not making changes to it as new code is released.
- Tome sync
- content import with some kind of import.
- A migration from a csv or other data source? (would still need a way to export)
Comments
Comment #3
swirtThis feature has been added.
The module now has a built in system for exporting CM Documents from you local environment and having them import into your production site when your code deploys.
Drush commands
drush content-model-documentation:export <id>hook_update_n()
Comment #4
swirtWent out with 1.0.21