Javascript sorting functionality

I’m implementing ZettelKasten in Ob with Luhmann’s hierarchical ID as title. Can you offer a way to sort filename such that 10.md is after 9.md instead of between 1.md and 2.md ?

1 Like

Name 1.md 01.md and this should solve it. If you expect to have more than 99 notes, then name it 001.md. Pad with zeroes every single digit note name and they should sort correctly.

Luhman’s hierarchical id was there to serve as a backlink into the knowledge base (a single one). It forced him to stop and think about how each note fit into a hierarchy of notes (a feature with great value). How does using that as a note title add value to a system with built-in backlinking?

Yes there is great value in thinking about how the note fits into the existing knowledge base. You can do that as part of the backlinking process or by creating MOCs/Header pages etc. Not sure how having titles that are meaningless at first glance or that force hierarchy onto the system will add value to your Zettlekasten. Seems to me it is the equivalent of forcing your knowledge base to be backwards compatible to outdated systems.

1 Like

Well, in my system, I name notes as hierarchicalID-Title. I think the advantage of hierarchical ID over pure backlink is that as notes grow, there may be too many backlinks to one note without difference of degree of relevance, while with hierarchical ID there are at most two neighbours plus parent and children thereby I can quickly get how this note fits in my knowledge system.

Well, in hierarchical ID system, I may have something like 1a12c30d, using too many zeros seems a little bit odd. Besides, as note grows, maybe some branch goes very wide while others can be very narrow. So deciding how many digits are needed at the first place may not be a good idea.

This has been implemented in Obsidian Release v0.8.15 :

Numbers are now naturally sorted, so “1”, “2”, and “10” will now sort in the expected order.

So can be archived IMHO.