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

Add Option to generate Obsidian URLs in Landmark Subdirectories #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lbrooney
Copy link

Apologies for the title, but I'm having trouble succiently describing it.

I like how Waypoint automatically generates a Table of Content, but unfortunately it links sub-sub-directories with the top directory. Of course I could place Waypoints and sever the links, but it diminishes the Table of Contents aspect a bit. I did a little research and to my understanding there seems to be only one way to link to another file without connecting them on the graph: obsidian://open?vault=[VAULT NAME]&file=[FILE NAME].

Quickly hacked something together. Added another bool to getFileTreeRepresentation that defaults to false. During the folderNote section, if the setting is enabled and a landmark is in the file, set bool to true, and subsequent recursions will generate the Obsidian URL instead of MD/Wiki Links.

Results are a graph that looks identical to one with sub-directory Waypoints and table of contents that is close to one without sub-directory Waypoints, the difference beings the links. Functionally close to a MD/Wiki Link except no middle clicking new tab, dragging to tab, and likely other convenience features that come with native links. Settings description could probably use some work.

Breaks your portable "rule" in the README, so I would understand if this were rejected. Links useless if moved out of current vault/need to be regenerated.

Child 1 & 2 are using Landmarks, Child Waypoint is using a Waypoint. Based off brief testing I don't think I broke anything.

graph
ToC
Landmark
Landmarks themselves still generate MD/Wiki Links, its just higher level Waypoints don't.

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

Successfully merging this pull request may close these issues.

1 participant