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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

yihui
Copy link
Owner

@yihui 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:

output:
  blogdown::html_page:
    toc: true

Example: https://deploy-preview-7--hugo-xmin.netlify.com/post/2017/06/22/rmd-toc/

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: https://deploy-preview-7--hugo-xmin.netlify.com/about/

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

@enersto
Copy link

enersto commented Feb 1, 2019

So there is still no toc_float for html_page?

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

Successfully merging this pull request may close these issues.

2 participants