-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Feat: Adds logic to look for links in frontmatter #944
base: v4
Are you sure you want to change the base?
Feat: Adds logic to look for links in frontmatter #944
Conversation
- Adds outgoing/backlinks to the graph - Adds backlinks to the backlink pane
@@ -23,6 +25,7 @@ interface Options { | |||
openLinksInNewTab: boolean | |||
lazyLoad: boolean | |||
externalLinkIcon: boolean | |||
includeFrontmatterLinks: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
includeFrontmatterLinks: boolean | |
includeFrontmatter: boolean |
// Add frontmatter links to outgoing links | ||
if (opts.includeFrontmatterLinks && file.data.frontmatter) { | ||
for (const [fmKey, fmValue] of Object.entries(file.data.frontmatter)) { | ||
if (fmValue && typeof fmValue === "string") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah you might need to take a look at how we handle links in ofm.ts
to handle alias, intra-links docs, and marks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do this in ofm instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah you might need to take a look at how we handle links in
ofm.ts
to handle alias, intra-links docs, and marks
I tried to but I didn't manage to get a grasp of how it works. This is still too high level typescript for me 🤣
imo this shouldn't be allowed (even obsidian doesn't show these links in the graph if they aren't in the we should expose the ability to parse a wikilink as a function so that plugin authors may opt-in to that behaviour if they would like though |
Actually, it does. In the links pane, in the backlinks section and in the graph :) So, this change would be completely compatible with "raw" obsidian without plugins. Additionally, this allows to create an obsidian breadcrumbs plugin for quartz. |
TIL. we do live in a society lol |
cc @saberzero1, since you are looking into markdown parser, might be of interests, but lower triage than the refactor. |
see also #1427 |
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
I was missing this feature and implemented it, not knowing that there was jackyzha0#944 already ¯\_(ツ)_/¯ Looking at it now I think that my impl is a little better, and I'd love to have it upstreamed. Closes jackyzha0#820 and jackyzha0#944
fwiw let me finish writing remark-wikilinks and then it should parse it for once. |
Parses the frontmatter data for wiki links