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 show the table of contents #7

wants to merge 2 commits into
base: master


1 participant

yihui commented Jun 23, 2017

It depends on whether your post is R Markdown or plain Markdown. For R Markdown, it is easy -- just add this to YAML:

    toc: true


For plain Markdown posts, the template single.html has to be modified. For example, we can use a YAML parameter toc to control whether to write out .TableOfContents. Example:

The CSS style was defined in style.css (a lightgray border).

@yihui yihui added the feature label Jun 30, 2017

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