Nested Inline Fields
See original GitHub issueIs your feature request related to a problem? Please describe. Frontmatter data can be arbitrarily nested however as far as I understand it your inline field system is limited to just top level keys and values.
Describe the solution you’d like It would be nice if there was a way to describe arbitrarily nested data through the inline fields as well. This may be incompatible with the current implementation so I understand if you mark this as won’t-fix
For example I would like to collect all date ranges under the date
key for easy accessing.
In YAML I would do something like this.
---
date:
construction: 2000
life: 2000-2020
demolition: 2020
---
Could be defined inline as
(date:: construction:: 2000)
(date:: life:: 2000-2020)
(date:: demolition:: 2020)
And rendered like this
Additional Context There are some compatibility issues that I don’t have answers to eg what would the following look like in data form
(date:: 2000)
(date:: life:: 2000-2020)
or this
(date:: 2000)
(date:: 2020)
(date:: life:: 2000-2020)
Issue Analytics
- State:
- Created a year ago
- Comments:15 (7 by maintainers)
Top GitHub Comments
I have opened a pull request to fix the html corruption.
I have had some more thoughts on how the data should be structured when parsed.
Examples
Here are some examples of how the plugin currently parses data (I believe)
Example 1
becomes
Example 2
becomes
Example 3
becomes
Example 4
becomes
The two options going forward as far as I see them are either
I don’t think it would be wise for the dataview plugin to try and merge the data more than this due to the ambiguity of how to merge dictionaries as well as the possibility of the list containing strings.
I have solved this particular issue in a different way outside of the dataview plugin. I thought I would just thought I would open the discussion.