New maintainer needed for "Dynamic ToC"

The “Dynamic ToC” community plugin (GitHub, plugin directory) is in need of a new maintainer.

It’s been downloaded 27,359 times. I’m not aware of a way of seeing recent downloads.

At the moment, Pulse · Aidurber/obsidian-plugin-dynamic-toc · GitHub shows:

  • 0 Merged pull requests
  • 0 Open pull requests
  • 1 Closed issue closed by 1 person
  • 4 New issues opened by 4 people
  • 1 Unresolved conversation

The repo has been “archived” (probably on August 13th), so no new activity can occur.

Any devs interested?

See also: New maintainer needed for “Tag Page Preview” (same scenario, same dev, different plugin).

I’m using it.

I’m still learning JavaScript at the moment, but I’m thinking about maybe becoming the new maintainer of the plugin. Because then (I think) I might achieve a faster learning progress.

Do you use Dynamic ToC?

  • Yes
  • No
0 voters

@mrienstra you can achieve a reasonable implementation of this using Dataview, which might help in the decision of maintaining this or not.

Create a toc.js file in the root of your Obsidian vault, with this contents:

// Set this to 1 if you want to include level 1 headers,
// or set it to 2 if you want to ignore level 1 headers
const startAtLevel = 2
const content = await dv.io.load(dv.current().file.path)
const toc = content.match(new RegExp(`^#{${startAtLevel},} \\S.*`, 'mg'))
  .map(heading => {
    const [_, level, text] = heading.match(/^(#+) (.+)$/)
    const link = dv.current().file.path + '#' + text
    return '\t'.repeat(level.length - startAtLevel) + `1. [[${link}|${text}]]`
  })
dv.header(2, 'Table of contents')
dv.paragraph(toc.join('\n'))

And then in any note which you wish to add a dynamic TOC, you just add this code:

```dataviewjs
dv.view('toc')
```

Wow this is colossal! I’ve been looking for a DV toc generator forever, thank you!! :pray::blush:
Works like a charm