-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Add support for frontmatter links. Requires obsidian v1.4.0+. #2030
Add support for frontmatter links. Requires obsidian v1.4.0+. #2030
Conversation
Thanks for triggering the CI jobs for my branch. I ran |
Interestingly, tests pass so I can only assume we're missing some sort of test coverage. |
This is somewhat beyond my ability so let's see if the author comments. :) |
The build fail is also happening in the master branch, but PR #2021 already addresses it |
I believe I have addressed the failing CI jobs! Could a maintainer please approve the CI job run for this PR? |
Huh, there is a new |
Hey, thanks for all you do :) Is there any estimate on when these fixes will be available in obsidian, or is downloading this repo and adding the plugin manually the best option for now? |
I don't know how to cut releases but I think we should push something out on BRAT |
I just cut release 0.5.57 which includes this and many other community PRs. I did a bit of testing where the feature appears to work! |
I cannot thank you enough! I immediately went ahead and updated and it seems to have fixed the issue i was having (it was messing with some frontmatter links in the leaflet plugin) |
Issues
Changes
file.outlinks
andfile.inlinks
Context
The new Obsidian 1.4.5 release added a new feature called Properties. One of the things it does is add support wiki-style links (e.g.
[[]]
) in the yaml frontmatter (if propertly quoted). These links are not added to the.links
property inCachedMetadata
. Instead they are added as a new and separate property called.frontmatterLinks
.I believe that my change of adding the
CachedMetadata.frontmatterLinks
toPageMetadata.links
resolves the issues described in #2019 and #2029 wherefile.outlinks
andfile.inlinks
do not include links added to notes in yaml frontmatter using the new Properties functionality.Note about the API
The web API docs are out of date. You can see the update to the
CachedMetadata
class in the latest API source code was added in v1.4.0 and is documented in the changelog.Other impacts
I ran
npm run test
and all the tests pass, but I'm not sure if there are other concerns with either of these changes (i.e. updating the minimum dependency version and adding frontmatter links tofile.outlinks
andfile.inlinks
. I could definitely use some advice from the maintainers and/or core contributors on this.Testing
You can test this out by doing the following.
Verify that frontmatter links are not included in
file.inlinks
andfile.outlinks
without this patch:myprop: "[[existing note]]"
in source code mode if you don't want to use the Properties interface)Verify that frontmatter links are included in
file.inlinks
andfile.outlinks
with this patch:npm install
to update the dependencies