Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: generate table of contents when [TOC] is present #66

Closed
danielb2 opened this issue Jan 2, 2023 · 9 comments
Closed

[Feat]: generate table of contents when [TOC] is present #66

danielb2 opened this issue Jan 2, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@danielb2
Copy link

danielb2 commented Jan 2, 2023

app

joplin-vscode-plugin

Description

plugin to generate table of contents from markdown when [TOC] is present like native joplin would

Describe alternatives you've considered

manually generate table of contents with another vscode plugin

@danielb2 danielb2 added the enhancement New feature or request label Jan 2, 2023
@rxliuli
Copy link
Owner

rxliuli commented Jan 2, 2023

Have you tried the markdown-all-in-one plugin, it already supports something similar. ref: https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one#table-of-contents

@danielb2
Copy link
Author

danielb2 commented Jan 2, 2023

Yes, that's the alternative I've considered. Still requires manually generating a TOC which it then keeps up todate. Of course, then when i use joplin, it will not be kept up to date there

@rxliuli
Copy link
Owner

rxliuli commented Jan 2, 2023

Well, if you're just for viewing, maybe you don't have to render the toc in html, vscode itself provides similar functionality.

ref: https://code.visualstudio.com/docs/languages/markdown#_document-outline
image

In addition, it is indeed a bit strange. I did a simple search, but I did not find a vscode extension that supports this syntax. Isn’t it some existing standard? Or is it only supported in joplin?

@rxliuli rxliuli closed this as completed Jan 2, 2023
@danielb2
Copy link
Author

danielb2 commented Jan 2, 2023

The outline is a good workaround, thanks

Isn’t it some existing standard? Or is it only supported in joplin?

Not that I'm aware. I've seen some variants of it before tho, for example, I believe some wiki engine had %toc%

@danielb2
Copy link
Author

danielb2 commented Jan 2, 2023

btw, I recommend two extensions in addition to the ones you have...

between the two, the vscode plugin acts even more like joplin. It's getting to the point where this plugin is almost like JOplin itself which is why I thought the [TOC] was missing

@danielb2
Copy link
Author

danielb2 commented Jan 3, 2023

@rxliuli not sure you see the msgs after it's been closed

@rxliuli
Copy link
Owner

rxliuli commented Jan 3, 2023

Maybe support for joplin's toc syntax can be added at some point, but since there are already alternatives, it won't be a high priority

@silopolis
Copy link

@danielb2 I believe the [TOC], or [[TOC]] which also seems to work in Joplin, tag is supported by either the Markdown Extended extension or the Markdown Extended Preview one.

@danielb2
Copy link
Author

@danielb2 I believe the [TOC], or [[TOC]] which also seems to work in Joplin, tag is supported by either the Markdown Extended extension or the Markdown Extended Preview one.

interesting. I had been using the more popular All in one markdown which doesn't have this supported. thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants