I’m fiddling with implementing JD in Obsidian for my personal and academic duties. I chose the “one note per ID” strategy, because it looks the easiest. However, I realised that I would still like to have an index file, so that it is quicker to scan through the IDs on mobile.
After a bit of online search, I implemented a dynamic index file via the Dataview plugin (with dataviewjs enabled).
Very cool. Next we need a clean-up script for when I just slam a note in with just the xx.yy identifier and don’t take the time to do the front matter.
I do something very similar, although I make notes for areas and categories as well. It gives me a nice place to describe the area/category, its scope etc. I also use data view inside these to list its categories (for areas) or IDs (for categories).
I’ve uploaded a sample to Github. It looks like this:
Here is my dataviewjs version, it’s based on Life Admin version with notes for are/categories/ids and I added #type/index tag to all of them.
Script also adds highlighting to header ids.
function formatItem(i) {
let typeMark = "";
if (i.file.name.indexOf('■') > -1) {
return `==${i.file.link}==`;
}
return `${i.file.link}`;
}
let pages = dv.pages("#type/index").sort(p => p.file.name, "asc");
const by_area = pages.groupBy((p) => p.file.folder.split('/')[0])
for (let area of by_area) {
dv.header(3, area.key);
const by_category = area.rows.groupBy((p) => p.file.folder.split('/')[1]);
for (let category of by_category) {
const categoryRoot = dv.el("ul", "");
const categoryRootLi = dv.el("li", `[[${category.key}]]`, {container: categoryRoot});
const idRoot = dv.el("ul", "", {container: categoryRootLi});
for (let id of category.rows) {
dv.el("li", formatItem(id), {container: idRoot});
}
}
}
I have used and abused Obsidian for a long time, and really gone deep on dataview and todo systems. While I really like what they can achieve, it has always sat poorly with me that the file was now no longer usable outside of Obsidian. @ellane mentioned the Waypoint plugin in another thread here, and I think it is a great fit for this task. It does not allow for as nice formatting as dataview does, but it makes the file readable anywhere, which i find a huge plus.
I would add, I have not tested this on a large Obsidian vault, so I don’t know if there is a performance cost at some point, but given that it only updates on file management events (create, delete, move), I don’t think it will be noticeable.
I agree with @alterecco. I increasingly try to limit my use of Dataview (and now Bases) to assisting my work flow in Obsidian (e.g, finding notes that I’ve tagged for further development), and avoid using them for anything that I would want to be enduring.
I tried the Waypoint plugin to develop my JDex and I don’t know if I was doing something wrong but I found it kind of unstable – it would suddenly reinterpret my folder structure and produce gibberish and I’d have to reinsert the waypoints. I decided instead to just create my index manually with hard-coded links to the files. It’s more work to set up initially but once I have my basic structure in place there won’t be a lot of maintenance going forward. I don’t mind the extra bit of friction when I add a new ID, and I’ll have confidence that it is accurate and endures.
If you don’t mind, would love to hear about how you’ve used Obsidian to create your JDex if you don’t mind. I figured with Bases that it should automatically create a JDex (why I finally dove into the JD system) but because Bases ignores folders, it doesn’t exactly work in the sense that it displays in order but folders aren’t clickable (probably not the worst but looking at other systems).
@m.rose, I’m not sure if you’re asking me or one of the others who posted in this thread? I did not use Bases for my JDex, because I wanted it to be pure markdown in case I ever want or need to migrate it from Obsidian in the future. Here’s what it looks like in Editing and Reading view side-by-side:
After creating a note for each Area, Category, and ID, I just literally typed links to them into my JDex note. It’s obviously more work this way but because Obsidian auto-fills when you start typing a file name it goes pretty quickly. It’s all Markdown so can be exported and viewed in any markdown editor, and it’s nicely formatted using nested headings and bulleted lists. I like that I can collapse the whole thing and then only expand the parts that I’m working on.
But this is not for everyone. If automation is your priority, then a Dataview solution (as described earlier in this post) or Bases is absolutely doable. While Bases does not output links to folder paths, it does output links to notes. Others in this forum have recommended the Folder Notes plugin; I think you could use this to associate notes with your folders and then it should be possible to generate an index using Bases.
Thanks! I was asking you. Will keep this in mind if Bases doesn’t quite work. Thanks for the Folder Notes plugin, it certainly helps. I also found the need for the Custom Sort plugin since Obsidian doesn’t treat folders and files equally when sorting.