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

V1.0.x 忽略在指定页面生成导航 #15

Closed
zq99299 opened this issue Mar 9, 2017 · 6 comments
Closed

V1.0.x 忽略在指定页面生成导航 #15

zq99299 opened this issue Mar 9, 2017 · 6 comments

Comments

@zq99299
Copy link
Owner

zq99299 commented Mar 9, 2017

在某些情况下,是不需要生成的,比如介绍页。有可能有这个需求

@NewFuture
Copy link
Contributor

NewFuture commented May 30, 2017

两种方案 :

  • 通过 metadata 标注
  • 特定html注释

第一种方案,在markdown 的开头

---
notoc: true
---

可以通过 page.notoc判断

第二种方案 类似与 markdown-toc

<!-- notoc -->

可以通过/<!--[ \t]*notoc[ \t]*-->/.test(page.content);判断

也可以两种方案都用上

@zq99299
Copy link
Owner Author

zq99299 commented Jun 2, 2017

en . 好的我试试。 一直不知道怎么取到这个标记呢。

@NewFuture
Copy link
Contributor

另外,这个问题,
当页面只有一个标题的时候,也没有必要显示那个目录

@zq99299
Copy link
Owner Author

zq99299 commented Jun 2, 2017

嗯。 貌似是的。 这个倒是可以优化下

@NewFuture
Copy link
Contributor

PR 了 #21

@zq99299
Copy link
Owner Author

zq99299 commented Jun 2, 2017

已解决v1.0.4

@zq99299 zq99299 closed this as completed Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants