Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Dataview front matter access #46

Open
nayr31 opened this issue May 5, 2023 · 6 comments
Open

[Feature Request] Dataview front matter access #46

nayr31 opened this issue May 5, 2023 · 6 comments
Labels
enhancement New feature or request release Completed. Will be in next release

Comments

@nayr31
Copy link

nayr31 commented May 5, 2023

It would be great to have access to front matter fields for centralized math operations.

I've included an image in a possible solution using the dataview standard in calling front matter from other files, with core and mod being values in that file's front matter.

image

@MultiverseHitchhiker
Copy link

this opens up great opportunities for what I call "programmable contexts" and for which I love Obsidian so much.

@gtg922r
Copy link
Owner

gtg922r commented Jun 25, 2023

Some support for this is coming. Currently I have added support for frontmatter from the current file, and it can be available as a variable. Next will add dataview inline field support. Considering accessing values of other files

@gtg922r gtg922r added enhancement New feature or request in-progress Currently in development labels Jul 3, 2023
@gtg922r
Copy link
Owner

gtg922r commented Jul 3, 2023

Should land in beta builds later this week

@dav-garcia
Copy link

Hi, will this new feature also support inline fields via [key:: value] or (key:: value)?
Anyway, thanks for this awesome plugin. :-)

@gtg922r
Copy link
Owner

gtg922r commented Sep 3, 2023

Beta is live with frontmatter access in 1.3.

To try it out get Obsidian BRAT: https://github.com/TfTHacker/obsidian42-brat and point it at this repo to install the beta version of Numerals.

Please try it out and leave feedback!

In order to access metadata, you need to tell Numerals to make the value available by:

  1. Set the numerals metadata value (either frontmatter or dataview inline property) to the name of the value you want to include, or a list of values
    • Frontmatter of numerals: other_metadata_name, or numerals: [metadata_1, metadata_2]
    • inline value: [numerals:: other_metadata_name]
  2. Set the metadata value of numerals to all: will index all metadata and make it available to dataview
  3. Enable "Always Process All Frontmatter" in the Numerals settings

Further detailed instructions coming soon. Metadata values are available in a code block and will show up in autosuggest. Code blocks will automatically update when metadata changes.

@HighPriest
Copy link

Hey @gtg922r
The frontmatter parsing works great for the local properties and the maths executes perfectly fine for me, but what about accessing properties in other notes?
Is it possible already?

@gtg922r gtg922r added release Completed. Will be in next release and removed in-progress Currently in development labels Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release Completed. Will be in next release
Projects
None yet
Development

No branches or pull requests

5 participants