Auto-collapse Backlinks at the bottom of page

What I’m trying to do

The Backlinks at the bottom of each page are immensely helpful, but now that I’ve built up a bit of a library I have sections with 100+ linked mentions at the bottom.

It seems like it should be a really simple thing to toggle these to be auto-collapsed. But every help thread I’ve seen people just want to hide the backlinks completely.

Inspecting the CSS, I can see that there is a class for it being toggled, so being able to have it toggled is-collapsed by default seems like it should be easy.

Things I have tried

Searching the forums, looking at the core plugin settings.

2 Likes

I’m missing this feature too. It should be a second setting in the plugin options.

The current setting lets us only choose, if we want to see the backlinks section. A future setting would let us choose, how it should be displayed.

I’d also prefer a folded view, that only shows the names of the backlinking notes.

So this feature is implemented but not displayed? Or this feature is not implemented?

The feature is neither implemented nor displayed AFAIK.

Currently we have only this option:

It opens notes with backlinks at the bottom, that look like this:

I wish we had an option that would display the backlinks by default like this:

1 Like

Thanks for the clarification.

I agree, that is exactly what I would like, I have notes with 100+ backlinks and having the list is really useful but having an expanded list of linked mentions makes it visually noise and difficult to navigate.


p.s. As this has no solution, should I mark your answer as being the solution? I’m not sure what the etiquette is on these forums.

I don’t know either. Just leave it as unresolved, I guess?

I added the screenshots just for clarification and future reference. Maybe someone feels inspired and programs the feature. :smiley:

Without looking too much into this, one possible idea could be to hide all the content, and only display it when hovering over the corresponding title.

That should be doable with some rather simple CSS, I think.

Hiding is simple. Here you go:

.embedded-backlinks .search-result-container .search-result-file-matches {
	box-shadow: none;
}

.embedded-backlinks .nav-header,
.embedded-backlinks .tree-item-self .tree-item-flair-outer,
.embedded-backlinks .search-result-container .search-result-file-title .collapse-icon,
.embedded-backlinks .search-result-container .search-result-file-title .tree-item-flair-outer,
.embedded-backlinks .search-result-container .search-result-file-match {
	display: none;
}

It looks like this:

Hovering is above my pay-grade. :innocent:

Hehe… just use the same selectors and add :hover (with no spaces after each selector), and use display: inherit or similar within.

The original code seems to catch :hover events with Javascript.

The current CSS is good enough for me. Even with some elements hidden, hovering the mouse still highlights individual search results and clicking with the mouse still opens the linked note.

hidden

I had a similar problem as OP with 100+ backlinks in some notes. Removing the noise, but keeping links active, solved it for me.

If anybody knows more sophisticated solutions, please post!

Edit: GIF added