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

Links in Admonitions are not displayed in Graph View #18

Closed
TobiasKlosek opened this issue Apr 29, 2021 · 16 comments
Closed

Links in Admonitions are not displayed in Graph View #18

TobiasKlosek opened this issue Apr 29, 2021 · 16 comments

Comments

@TobiasKlosek
Copy link

@TobiasKlosek TobiasKlosek commented Apr 29, 2021

Somehow the Links which are located inside the Blocks are being ignored:
At the right is the Local-Graph-View.
image

Here i created the link outside the Codeblock and as you can see it works properly.

image

@TobiasKlosek TobiasKlosek changed the title Links to another Notes inside the Blocks are ignored Links to another Notes inside the Blocks are being ignored Apr 29, 2021
@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented Apr 29, 2021

I dont know how much influence this Plugin can have in terms of how Obsidian handles content inside these blocks, but a (quite ugly) but simple Workaround would be, to search for links inside these blocks and inserting the matches right after the block inside these: %% [[LINK]] %% which are not rendered:
image

@valentine195
Copy link
Owner

@valentine195 valentine195 commented Apr 29, 2021

Unfortunately this would be difficult to solve. I don't know how Obsidian's graph view is created, but I would assume it is being built from their metadata cache. Because the Admonition content is rendered as markdown after the note, it is not pushed into the cache.

I think if you require the graph view to show this, you'll have to create the links outside of the admonitions (at least for now -- I'll try to think of a way to possibly implement this, or the API could be updated to allow for it easier).

@valentine195 valentine195 changed the title Links to another Notes inside the Blocks are being ignored Links in Admonitions are not displayed in Graph View Apr 29, 2021
@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented Apr 29, 2021

I already thought about that this is on Obsidians site. They're probably ignoring everything whats inside these codeblocks.
Thanks btw for these fast responses and implementations! Really appreciate it.

Would be very thankful if there is a way to achieve this, since I'm using these Admonitions for all purposes.

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 5, 2021

Do you see any chances to accomplish that? It's very unfortunate to write the links again outside the blocks... since this is the last thing that somehow hinders me to fully migrate on using these admonitions. I already opened a PR for this in the Forum, but it didnt got any attention yet: Feature-Request on Obsidian.md

@valentine195
Copy link
Owner

@valentine195 valentine195 commented May 5, 2021

Thanks for opening the feature request. Like I said, I have no idea how the graph view plugin works, and my guess about data not being pushed into the cache could be incorrect. If there's any suggestions in that thread I'll implement it ASAP.

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 5, 2021

Hey, thanks for responding.
I talked to a mod, which told me that this will be a hard deal, because these codeblocks are initially designed to ignore such links.
But it was also said, that a different syntax which isnt using the codeblock-syntax would work. Would that be possible? :)
To have some sort of 2 ways to define these admonitions? One with code-blocks (for compability of current usage of the admonitions) and one another syntax? Since Obsidian is just ignoring content inside these codeblocks, this could be the way to go, or am I missing something?

@valentine195
Copy link
Owner

@valentine195 valentine195 commented May 5, 2021

Possibly. In adding support for nested admonitions, I basically programmed support for the Python syntax (!!! ad-note) anyway. I'll tinker with allowing it at the top level instead of a code block, but you won't get the background highlighting (unless I can figure out how to add some new syntax to the CodeMirror editor).

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 5, 2021

That would be awesome! What do you mean by background highlighting?

@valentine195
Copy link
Owner

@valentine195 valentine195 commented May 5, 2021

Something like this:

image

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 5, 2021

Gotcha. Ok for now that will be sufficient I think. This was/is kinda nice because it also provides a visual breakdown of the different sections. Thanks for being so fast!

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 10, 2021

Sorry for the impatience, but Im somehow dont know if porting my notes to the admonition-style makes sense right now without the possibility to automatically create graph-links. Is there any timeline where the alternative syntax is implemented?

@valentine195
Copy link
Owner

@valentine195 valentine195 commented May 10, 2021

This is a rather difficult problem, unfortunately. I can't give you a timeline.

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 12, 2021

Oh, sorry to hear that.. but thanks for hearing me.

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 26, 2021

hey, is there any chance to get the backlinks somehow working? I already wrote with a bunch of people looking for an alternative way to get the backlinks working outside your admonition plugin but unfortunately with no success..

@valentine195
Copy link
Owner

@valentine195 valentine195 commented May 26, 2021

4.3.0

Please see this new setting.

@TobiasKlosek
Copy link
Author

@TobiasKlosek TobiasKlosek commented May 26, 2021

Thanks! This made my day! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants