Inline Fields
Dataview supports “inline” fields via a Key:: Value
syntax that you can use everywhere in your file.
This allows you to write your queryable data right where you need it
Inline field on its own line
If your inline field has an own line, without any content beforehand, you can write it like this:
Example
foo:: Some random Value bold_foo:: Nice! All content after the
::
is the value of the field until the next line break.
Mind the ::
Note that you need to use a double colon
::
between key and value when using inline fields, contrary to YAML Frontmatter fields where one colon is enough.
We can style the inline fields with some custom CSS
Example
[foo:: some random value] [bold_foo:: Nice!] The CSS is applied at the reading mode but the inline fields must be placed inside square brackets
Embed inline fields
Bracketed inline fields
If you want to embed metadata inside sentences, or multiple fields on the same line, you can use the bracket syntax and wrap your field in square brackets:
This file was created at [created:: =this.file.ctime
] and it was modified at [modified:: =this.file.mtime
]
Squared inline fields
There is also the alternative parenthesis syntax, which hides the key when rendered in Reader mode:
This file was created at (created:: =this.file.ctime
) and it was modified at (modified:: =this.file.mtime
)