Any way to more elegantly name internal links to headers?

A link like…

[[I Didn’t Do The Thing Today#5.5. Teleo-anticipation allows for down-modulation of task-energy expenditure]]

#1 … renders as a combination of the filename and header name, separated by hash…

[I Didn’t Do The Thing Today#5.5. Teleo-anticipation allows for down-modulation of task-energy expenditure]

#2 When previewed, the separator is an arrow…

I Didn’t Do The Thing Today > 5.5. Teleo-anticipation allows for down-modulation of task-energy expenditure.

Are there other options to control how these things appear?

I know you can specify a custom link title with a pipe (|).

But I’m curious whether a) alternative separators can be used, b) spaces can be added either side of it in edit mode and c) whether there is an option to suppress display of the leading file name.

I think your best option for control is to use the pipe.

a) alternative separators — (I assume you mean in reading mode) Might be possible without a plugin if Obsidian is generating the separator in CSS. I’d guess they’re not, but you could dig into the inspector to check.

b) spaces can be added either side of it in edit mode — Probably not, but check in the inspector how Obsidian marks it up. If the pipe is wrapped in its own span or something then you can apply styles to it.

c) whether there is an option to suppress display of the leading file name. — Same as b), except I think this one’s more likely to be wrapped in something you can target.

Hi ! Here is your answer for c) GitHub - Signynt/link-headers-directly: When a header is linked, preview mode will show only the header, and not the note name
Here is a fork I did, that could be easily changed as an answer to a)GitHub - AnthropologieBiblique/link-headers-with-comma: When a header is linked, preview mode will show only the header, and not the note name

1 Like

Note : it’s not compatible yet with live preview mode… Apparently @Signynt, the author of the first, doesn’t know how to do it. I don’t know either. Any skilled dev willing to help, would be awesome !

1 Like

C) Would be it - good-looking plugin.
Unfortunately, I find that it doesn’t work.

I had some initial instances where it didn’t work, so fingers crossed now.

Thanks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.