Conversation
|
I may have overthought this a bit. This pull request lets you actually change the field names of system fields like |
|
Finally getting a chance to review this! I think there is definitely a need to handle mapping from schema to schema so not to have to swap out all the jekyll templates when switching over. Think this is an awesome hack, but I fear the invention of a new recursive syntax with [ ] and the field to field remapping in the Basically using a variable and jekyll's ability to embed a variable within a variable (ex. for default in for data.json v1.1 schema |
|
Alternative approach to editing schema as json to remove the need for creative logic/hacks of dataset entries... Using a JSON schema to control the hierarchy, ordering, description of the fields could significantly simplify the core jekyll site and reduce the workflow to:
datajson-editorusing data.json but could control which schema is used and offer the DEMO |
|
Closing in favor of #60 |
Following the discussion in pull request #56, which was prompted by issue #34.
This pull request allows the site administrator to add a schema file to the
_data/schemas/directory and activate it by modifying theschemasetting in_config.yml.Dataset display pages have (a) title, (b) organization, and (c) description hard-coded into the layout. These are considered "system fields," which schemas should specify using the
system_fieldproperty.Below that, the Resources are rendered. These need to be configurable too - this pull request isn't quite finished because of this.
Following that, the rest of the fields in the schema file are rendered in the order they are listed in the schema file.
Schema files support bracket notation to access deep values (thanks to a clever/hacky "recursive function" if you can call it that).
Datasets have a
schemaproperty in them, which allows JKAN to render the display page and form according to the specific dataset (rather than just the site-wide setting).Thoughts @JJediny?
TODO:
datasets.jsonshould access the data viasystem_fielddata-hookwith system fields instead)