Waypoint icon indicating copy to clipboard operation
Waypoint copied to clipboard

Add Option to generate Obsidian URLs in Landmark Subdirectories

Open lbrooney opened this issue 1 year ago • 1 comments

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.

lbrooney avatar Apr 19 '24 02:04 lbrooney