# Dynamically generate JDex file from JDex notes in Obsidian

**URL:** <https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803>\
**Category:** Workbook/Workshop\
**Created:** [September 5, 2024, 2:35pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803 "2024-09-05T14:35:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spinal1865](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/spinal1865/32/1057_2.png) [@Spinal1865](https://forum.johnnydecimal.com/u/Spinal1865)\
**Post date:** [September 5, 2024, 2:35pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/1 "2024-09-05T14:35:17Z")

</div>

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](https://blacksmithgu.github.io/obsidian-dataview/) plugin (with `dataviewjs` enabled).

Here is a test vault with the structure:

 ![Istantanea_2024-09-05_16-18-02](https://forum.johnnydecimal.com/uploads/default/original/2X/d/d90465a5379a5feb5f337bb3046c925b124ce5f6.png)

The `00.00 Index.md` file looks like this:

````md
# Index

```dataviewjs
let categories = dv.pages('"00-09 System management/00 Meta-system/00.01 Index notes"')
    .sort(p => p.file.name)
    .groupBy(p => p.file.frontmatter.jdcategory)

let areas = dv.pages('"00-09 System management/00 Meta-system/00.01 Index notes"')
    .sort(p => p.file.name)
    .groupBy(p => p.file.frontmatter.jdarea)

for (let area of areas) {
    dv.header(2, area.key);
	let areaNum = Math.floor(Number(area.key.slice(0, 2)) / 10);
    for (let category of categories) {
	    let catNum = Math.floor(Number(category.key.slice(0, 2)) / 10);
	    if (areaNum == catNum) {
		    dv.header(3, String(category.key).padStart(2, '0'));
		    dv.list(
		       category.rows
		       .sort(k => k.file.name)
		       .map(k => k.file.link + ": " + k.file.frontmatter.jddescription)
		   )
		}
   }
}
```

````

For this to work, each JDex ID entry note should have

```yaml
---
jdarea:
jdcategory:
jddescription:
tags:
---

```

in the YAML frontmatter.

The pros I found for this approach are:

- I am less likely to duplicate IDs, because I can take a look at the used ones first from any device;
- by copying the dynamic result and pasting it elsewhere, I obtain a static single-file JDex.

There are cons, of course:

- creating a new entry takes more time;
- if Obsidian is not available, one still needs to scan the entries’ folder and look for an empty ID.

---

<div class="post-metadata">

**Author:** ![dvdlite](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/dvdlite/32/1042_2.png) [@dvdlite](https://forum.johnnydecimal.com/u/dvdlite)\
**Post date:** [September 5, 2024, 3:14pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/2 "2024-09-05T15:14:31Z")

</div>

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. 😛

---

<div class="post-metadata">

**Author:** ![Spinal1865](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/spinal1865/32/1057_2.png) [@Spinal1865](https://forum.johnnydecimal.com/u/Spinal1865)\
**Post date:** [September 5, 2024, 3:36pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/3 "2024-09-05T15:36:23Z")

</div>

For that, I use the stock Templater plug-in and use the command palette to forcefully insert the `jdex-slip` template

```txt
---
jdarea:
jdcategory:
jddescription:
tags:
---

# <!-- Insert ID name here -->
## Location
- Obsidian notes
- 

## Quick notes

```

---

<div class="post-metadata">

**Author:** ![osau](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/osau/32/350_2.png) [@osau](https://forum.johnnydecimal.com/u/osau)\
**Post date:** [September 8, 2024, 7:22pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/4 "2024-09-08T19:22:38Z")

</div>

Nice!

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](https://github.com/0ge/dataview-index/). It looks like this:

[https://github.com/user-attachments/assets/c340b31f-dab2-400c-860c-29bac3506286(image larger than 4 MB)](https://github.com/user-attachments/assets/c340b31f-dab2-400c-860c-29bac3506286)

There are some templates that I use for creating the index notes as well, and (obviously) the Dataview JS code.

Hope someone find it useful!

---

<div class="post-metadata">

**Author:** ![aviskase](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/aviskase/32/591_2.png) [@aviskase](https://forum.johnnydecimal.com/u/aviskase)\
**Post date:** [September 10, 2024, 2:39pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/5 "2024-09-10T14:39:12Z")

</div>

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.

```dataviewjs
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});
	    } 
    }
}

```

 ![image](https://forum.johnnydecimal.com/uploads/default/original/2X/d/d3369f53b7198315b326badf35cd40486d9d47ee.png)

---

<div class="post-metadata">

**Author:** ![alterecco](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/alterecco/32/1513_2.png) [@alterecco](https://forum.johnnydecimal.com/u/alterecco)\
**Post date:** [August 7, 2025, 9:39am UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/6 "2025-08-07T09:39:58Z")

</div>

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](https://github.com/IdreesInc/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.

---

<div class="post-metadata">

**Author:** ![neek](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/n/e480ec/32.png) [@neek](https://forum.johnnydecimal.com/u/neek)\
**Post date:** [August 23, 2025, 11:50pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/7 "2025-08-23T23:50:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![m.rose](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@m.rose](https://forum.johnnydecimal.com/u/m.rose)\
**Post date:** [August 26, 2025, 7:36pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/8 "2025-08-26T19:36:22Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![neek](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/n/e480ec/32.png) [@neek](https://forum.johnnydecimal.com/u/neek)\
**Post date:** [August 27, 2025, 8:40pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/9 "2025-08-27T20:40:47Z")

</div>

@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:

 ![JDex](https://forum.johnnydecimal.com/uploads/default/original/2X/a/afa6caa4e9c668e7554dc005231aeffc2ab492a4.png)

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](https://github.com/LostPaul/obsidian-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.

---

<div class="post-metadata">

**Author:** ![m.rose](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@m.rose](https://forum.johnnydecimal.com/u/m.rose)\
**Post date:** [September 1, 2025, 2:20pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/10 "2025-09-01T14:20:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aviskase](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/aviskase/32/591_2.png) [@aviskase](https://forum.johnnydecimal.com/u/aviskase)\
**Post date:** [October 3, 2025, 4:00am UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/11 "2025-10-03T04:00:09Z")

</div>

Since there is a group by and list view in the new Obsidian insider version, my _additional_ index view is now:

```auto
filters:
  and:
    - type == "index"
formulas:
  headerized: if(file.basename.contains("■"), icon("arrow-big-left"), "")
views:
  - type: list
    name: index
    groupBy:
      property: file.folder
      direction: ASC
    order:
      - file.name
      - formula.headerized
    separator: " "

```

The arrow part is ugly, but I wanted to somehow mark header ids. Later on I’ll try to make it less ugly xD

 ![image](https://forum.johnnydecimal.com/uploads/default/original/2X/e/eba20125b3f152023af497f003c7936ba8af3d41.png)

(Upd. strictly speaking, I don’t need `type: index` anymore, I should be able find all index notes by filename pattern)

---

<div class="post-metadata">

**Author:** ![quiet.coffee4170](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/q/90ced4/32.png) [@quiet.coffee4170](https://forum.johnnydecimal.com/u/quiet.coffee4170)\
**Post date:** [November 1, 2025, 6:56pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/12 "2025-11-01T18:56:01Z")

</div>

I wouldn’t mind knowing more about how you’re using these in a note because I put them in as dataview code blocks and got the finger

---

<div class="post-metadata">

**Author:** ![aviskase](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/aviskase/32/591_2.png) [@aviskase](https://forum.johnnydecimal.com/u/aviskase)\
**Post date:** [November 2, 2025, 3:13pm UTC](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/13 "2025-11-02T15:13:40Z")

</div>

If you’re talking about this [Dynamically generate JDex file from JDex notes in Obsidian - #11 by aviskase](https://forum.johnnydecimal.com/t/dynamically-generate-jdex-file-from-jdex-notes-in-obsidian/1803/11) , it’s not a dataview code block, but native Obsidian bases: [Introduction to Bases - Obsidian Help](https://help.obsidian.md/bases)
