-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Feature - directive to create TOC #136
Comments
Marp Core is hesitant adding any more features without consensus by community. Marp's built-in feature must be based on CommonMark, and we think that built-in features to enhance Markdown would have to be well-known syntax in Markdown and around communities. TOC is available in over 15 markdown-it plugins, and Marp (Marpit) parser can extend by plugin. You can try to add TOC feature through available plugin by yourself (or can create another TOC plugin optimized for Marp). // An example of engine.js for Marp CLI's custom engine
const { Marp } = require('@marp-team/marp-core')
const markdownItTableOfContents = require('markdown-it-table-of-contents')
module.exports = opts => new Marp(opts).use(markdownItTableOfContents) We may consider to add if our community showed TOC plugin is worth to add as built-in feature of Marp. |
Yes atm i have setup TOC like this, but i think it could be worth to add it as built-in plugin. |
I don't think that. Our core must keep simple and the least features to be continued maintenance. We don't want burning out again by much requests just like an old Marp. It's a reason why adopted pluggable architecture. Marp would have taken TOC plugin feature as built-in if it was well-known and taken in a lot of Markdown communities, but actually it does not. We are thinking users who want TOC are in the minority so it should provide as a third-party plugin. |
I understand better. This is mainly for use in vscode and at the moment external plugins are not supported. I will wait for the external engine support by the vscode plugin. |
If I use Marp in vscode ,if there has any vscode plugins that can offer TOC feature?any Recommend? |
A tip to get a clickable TOC: use links to page's anchors. <!-- _class: toc -->
# Table of content
1. [What is Marp](#what-is-marp)
2. [Why this theme](#why-this-theme)
3. [Available features](#available-features)
---
# What is Marp
---
# Why this theme
---
# Available features |
I would like to have a directive to show a TOC with page numbers and link to slide.
Ideally with options to customize level of toc or ignore some title.
What do you think about that ?
The text was updated successfully, but these errors were encountered: