shabegom / obsidian-reference-count Goto Github PK
View Code? Open in Web Editor NEWShow Reference Count of Block Refs
Show Reference Count of Block Refs
Just installed main, manifest, and styles. Activating in the setting does not work, causes a kernel panic instead.
MacOS 10.14, Obsidian 0.12.4.
When I open the table for a block with a reference, it always shows the same reference in the same file that I used to open the table in the first place. This can be a little annoying, as even though I can identify that it's just referencing itself by reading it/checking the filename, that isn't very helpful and takes time. It would be nice if we could optionally exclude that one (or at least clearly mark that it's the same reference).
obsidian-reference-count/src/main.ts
Lines 386 to 391 in eab5bfe
0.1.4
Obsidian supports special characters in headings and links to headings, but your plugin won't work with headings that do contain some special characters, in my particular case '
. I do understand this is a minor issue in english but some languages make extensive use of '
.
I hope this is clear enough, and thank you for your awesome plug in!
EDIT: Also the +
character breaks it
For header references I would like to see the original header in the Search Result Component Counter box just like how block refs show the source. Right now the source Header is not shown in the counter results search component.
Some parsing / logic issues I have found:
@shabegom HTML IDs are supposed to be unique to an individual element. Should use class for "search-ref" instead unless there is a real specific reason why you needed it to be ID?
Right now, the plugin only works with links like [[Link]], but not with links like [[../Link]] or [[Folder/Link]]. Would it be possible to make that work?
Hello!
Even if the count of backlinks is right (counting only the backlinks corresponding to the node + header), headers show all backlinks with the same header name even from different notes,
By example: [[a#ideas]] header ref counter will also show the backlinks that reference [[b#ideas]], [[c#ideas]]...
Also important details: it still works well on my mobile, probably because of the version difference: mobile version: 0.2.0 vs desktop version 0.3.1
Thanks!
Ok looks like I figured out why/how they got in the sidebar. It looks like it adds them each time you click a block ref counter button? We should definitely implement the onunload() fix above but also should try and figure out how not to add to the sidebar? Or at least hide from the sidebar?
Also maybe we run the same cleanup on obsidian start. So each time we start we start fresh without any old search views. If you click a block ref counter button and don't close the search view and then close Obsidian, when you open it next time you will have a search view in the sidebar that you can't remove.
Originally posted by @GitMurf in #26 (comment)
Problem: If a heading is referenced via a block-id and not a standard heading reference, the block reference counter button doesn't appear.
I use Zootelkeeper for indexing and it places links on the folder note to each note within that folder. Block counts don't show up unless I manually insert a blank line between each link.
Like this:
%% Zootelkeeper....
blank line
link
blank line
link
%% Zootelkeeper...
If I make a list of those links (prefer to create nested list), the block counts stop working all together.
Currently the counter does not show up in Live Preview. Is it on your roadmap to make an LP version?
Hi,
I really like using Block Reference Counts plugin, but recently update had some bugs
I found that it lost the option to close the list of table once it's opened
I prefer when the Block Reference table belongs to a heading, it should be hidden as well when I fold the heading.
I just tried to link to a block, it did appear number of links to that block but did not list out the table.
Thank you,
Missionary
Because the buttons are added inside the embed html element, when you try to click the block ref counter button it will instead click the link for the embed and jump you to that page. Preferably should move outside so the link for the embed doesn't overrule when clicking the counter button.
Hi! I love the Block Reference Counter plugin, however I have noticed a couple of things that make it unusable for my use case. First, I noticed very slow performance today on a page where I am using folded lists with many references. The performance has seemed to decrease as the size of my list/references increases. If I disable the plugin, performance gets better. I did not notice any performance issues with the plugin enabled on other pages where the pages did not have lists that were as long of as nested. So, it seems to possibly be an issue with folded/nested lists? Second, when I look at link results for, say the following block: [[John-03#v16]] the bock reference will list results for v16, even when not associated with the parent header. For example, might see [[Acts-01#v16]], etc. Maybe I am using it wrong, is there a way to only show references to [[John-03#v16]]? I hope I am making some sense.
Version 0.1.4
An in line block reference is like this:
some text ![[filename#^block id]] some more text.
There is no counter next to this in Preview. Is that intentional? Is it not possible? Is it a bug?
Doesn't work with [[#^abcdf]]
Problem: If the header includes a wikilink it won't be indexed by the indexer
Need to sanitize headings of all markdown syntax and wikilinks so that they match their associated links.
I recently made the upgrade from 0.1.7
to 0.3.0
.
In 0.1.7
, the target block and the link to the block could both have numbers next to them. I found that the most important part was that the target block (I believe that the plugin refers to this as the "child") had a number next to it. This worked great!
SInce the upgrade, the following things have happened:
For number 2, I'll be honest and say that I don't know what the expected behaviour should be when pressing the count for a parent when there are multiple block reference links in one paragraph. However, I'm assuming that links that are not block reference links should not be chosen as the search, either way.
I don't know if I'm alone with this behaviour, but right now the child side count is not working for block references, and there are now numbers on every line that has any link, which I'm guessing isn't the intent of the plugin.
I've tried looking around in the settings, but there does not seem to be a way to configure the plugin to behave like it did in 0.1.7
.
Problem: The highlighting in the reference view fade out nicely after it loads in the first time, but if you expand the context either with the show more context button or the arrows the highlight comes back.
Look into listening for rerenders of the search results and removing the highlight class.
In Live Preview I only see the count button if I click on an embed:
However, if my cursor is off the embed, the count button is not visible:
When I click on the count button it creates a little table showing which other notes the embed occurs in:
How can I close the table, make it disappear? There used to be a close cross.
Coul we have an option to separatedly enable it for headers, blocks and links?
Hello, Thanks for developing this plugin. I have it installed, but when I click on the count button it opens a view, under the block, that looks like the backlink panel and not formatted table. Originally saw in minimal theme, but still there in other themes so that seems to not be the issue. I don't mind the view, it is actually nice in that I have sorting and other options, but thought I might let you know. Thanks again.
Jeff
Am I right to say they do not show in the latest Insider version 0.13.7?
It seems that folder name is incorrectly added once more with each renaming. I tested which plugin could be responsible and it seems to be this plugin. (Bug apperas to be the same with all plugin options on/off, no effect turning off "Display on links" etc)
I am using Obidian 0.14.6. / Block Reference Counter 0.4.3.
Thanks.
Hello, I was personally thinking of a way to keep some kind of atomicity while keeping the number of file reasonably low for some types of data, so i thought that i could use centralized files acting a bit like a block reference database (for example with objects represented with h1 and their properties in h2), that i can refer from other notes in that way
- blabla
- bla
- [[centralizedFile#object a#property1]] blue
- [[centralizedFile#object a#property2]] graph feature
- bla
- [[centralizedFile#object b#property1]] red
- [[centralizedFile#object b#property2]] automation feature
Thanks!
Ref commit: a043b8f
In this commit I fixed an issue where the color and border were on the same line which made neither of them actually apply. When I fixed them with the commit above, both started to work and it added the inset border which doesn't look as good as it was before. I am going to remove the border property.
Video of issue: https://cln.sh/HK7Ne3
The reference counter works great on a normal block/heading, but when a block in a list item, it doesn't appear.
Note 1 references a header, say ### Header text
, in note 2. Let's say there are no other notes referencing the header.
Note 2 shows the count of 1 next to the header, which is correct, but when I click on the number 1 it only lists note 2, i.e. itself, instead of note 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.