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

How to enable ToC #21

Closed
JiantaoFu opened this issue Jun 1, 2015 · 3 comments
Closed

How to enable ToC #21

JiantaoFu opened this issue Jun 1, 2015 · 3 comments

Comments

@JiantaoFu
Copy link

I saw your demo page has ToC, but i've no idea how to enable it.

Have tried put "<%- toc(page.content, {list_number: true}) %>" in tranquilpeak/layout/post.ejs, but this can't achieve the that like you are doing in your demo site.

Thanks in advance!

@LouisBarranqueiro
Copy link
Owner

What is ToC (table of content?)? It's simply markdown.

@JiantaoFu
Copy link
Author

Thanks, just wondering if that is generated by ToC markdown extension or do that manually like this:

Table of Contents

  1. Example
  2. Example2

Example

Example2

"<%- toc(page.content, {list_number: true}) %>" is supported by hexo now, see hexojs/hexo#408, but when i do that, it seems it adding extra list number, and i can't remove it by {list_number: false}

image

OK, this might not relating to tranquilpeak, i will post issue for hexo, thanks!

@LouisBarranqueiro
Copy link
Owner

yes, it comes from the hexo-toc plugin or hexo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants