[GH-ISSUE #284] Support table of contents #105

Closed
opened 2026-03-03 00:18:25 +03:00 by kerem · 9 comments
Owner

Originally created by @themattgabriel on GitHub (Jan 11, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/284

Current behavior

Adding the lines below in the editor does nothing.

<!-- toc -->

<!-- tocstop -->

The option to add TOC is not available in the menu bar.

Expected behavior

Ctrl + Shift + T changes the view. It no longer generates table of content like it did with old boostnote.

Environment

  • Version : 0.1.3
  • OS Version and name : Windows 10
Originally created by @themattgabriel on GitHub (Jan 11, 2020). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/284 # Current behavior <!-- Let us know what is currently happening. Please include some **screenshots** with the **developer tools** open (console tab) when you report a bug. --> Adding the lines below in the editor does nothing. ``` <!-- toc --> <!-- tocstop --> ``` The option to add TOC is not available in the menu bar. # Expected behavior `Ctrl + Shift + T` changes the view. It no longer generates table of content like it did with old boostnote. <!-- Let us know what you think should happen. --> # Environment - Version : 0.1.3 - OS Version and name : Windows 10 <!-- Love Boost Note? Please consider supporting us on IssueHunt: 👉 https://issuehunt.io/r/BoostIO/BoostNote.next -->
kerem 2026-03-03 00:18:25 +03:00
Author
Owner

@Rokt33r commented on GitHub (Jan 11, 2020):

Implementing TOC generation sounds good to me. But I don't think using <!-- toc --> comment is a good idea. To update TOC, the app will modify content of a note again right after editing any headers in the notes. And I don't think the storage need to store the side effect changes. It would make Editor UX and Edit history of the note messier. So I think we need something different. Please let me explain what I'm thinking now.

ToC UI

Provide ToC UI so you can navigate a note without generating TOC.

ToC Shortcode

Using https://github.com/djm/remark-shortcodes, we could introduce new syntax like [[TOC]].

Original content

[[TOC]]

# AAA
# BBB
# CCC

Processed content(This will be rendered on preview and exported)

- [AAA](#aaa)
- [BBB](#bbb)
- [CCC](#ccc)

# AAA
# BBB
# CCC
<!-- gh-comment-id:573317892 --> @Rokt33r commented on GitHub (Jan 11, 2020): Implementing TOC generation sounds good to me. But I don't think using `<!-- toc -->` comment is a good idea. To update TOC, the app will modify content of a note again right after editing any headers in the notes. And I don't think the storage need to store the side effect changes. It would make Editor UX and Edit history of the note messier. So I think we need something different. Please let me explain what I'm thinking now. ## ToC UI Provide ToC UI so you can navigate a note without generating TOC. ## ToC Shortcode Using https://github.com/djm/remark-shortcodes, we could introduce new syntax like `[[TOC]]`. Original content ``` [[TOC]] # AAA # BBB # CCC ``` Processed content(This will be rendered on preview and exported) ``` - [AAA](#aaa) - [BBB](#bbb) - [CCC](#ccc) # AAA # BBB # CCC ```
Author
Owner

@themattgabriel commented on GitHub (Jan 11, 2020):

<!-- toc -->

<!-- tocstop -->

I was just referring to how it looked like in the old boostnote. I love the idea of having a TOC shortcode to keep it simple.

<!-- gh-comment-id:573327996 --> @themattgabriel commented on GitHub (Jan 11, 2020): > ``` > <!-- toc --> > > <!-- tocstop --> > ``` I was just referring to how it looked like in the old boostnote. I love the idea of having a TOC shortcode to keep it simple.
Author
Owner

@Rokt33r commented on GitHub (Jan 11, 2020):

@themattgabriel
Awesome! Then, I'll try to implement this soon! Thanks for sharing your idea.

<!-- gh-comment-id:573356721 --> @Rokt33r commented on GitHub (Jan 11, 2020): @themattgabriel Awesome! Then, I'll try to implement this soon! Thanks for sharing your idea.
Author
Owner

@Airsaid commented on GitHub (Oct 10, 2020):

What is the progress of TOC feature now?

<!-- gh-comment-id:706551779 --> @Airsaid commented on GitHub (Oct 10, 2020): What is the progress of TOC feature now?
Author
Owner

@Rokt33r commented on GitHub (Feb 22, 2021):

@Airsaid Still pending. I'll discuss this issue with my team and reveal our new roadmap soon.

<!-- gh-comment-id:783160466 --> @Rokt33r commented on GitHub (Feb 22, 2021): @Airsaid Still pending. I'll discuss this issue with my team and reveal our new roadmap soon.
Author
Owner

@linuxandroid commented on GitHub (Jun 29, 2021):

What is the progress of TOC feature now?

<!-- gh-comment-id:870763787 --> @linuxandroid commented on GitHub (Jun 29, 2021): What is the progress of TOC feature now?
Author
Owner

@Komediruzecki commented on GitHub (Jun 29, 2021):

Hi, all,

Implemented TOC generation via shortcode toc, the jumping to document line where heading is as well. It needs to be styled a bit, and it should ship in next release.

Thank you for your patience!

<!-- gh-comment-id:870864191 --> @Komediruzecki commented on GitHub (Jun 29, 2021): Hi, all, Implemented TOC generation via shortcode [[toc]], the jumping to document line where heading is as well. It needs to be styled a bit, and it should ship in next release. Thank you for your patience!
Author
Owner

@Komediruzecki commented on GitHub (Aug 9, 2021):

Closing issue as this was released.

<!-- gh-comment-id:895486688 --> @Komediruzecki commented on GitHub (Aug 9, 2021): Closing issue as this was released.
Author
Owner

@maksokami commented on GitHub (Dec 16, 2021):

Closing issue as this was released.

Hi,
Does it also work in Boostnote-local (using Boost Note 0.22.3)? Any instructions on how to make it work?

<!-- gh-comment-id:996241593 --> @maksokami commented on GitHub (Dec 16, 2021): > Closing issue as this was released. Hi, Does it also work in Boostnote-local (using Boost Note 0.22.3)? Any instructions on how to make it work?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#105
No description provided.