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
from
Open

How to show the table of contents #7

wants to merge 2 commits into from

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).

@yihui yihui force-pushed the feature/show-toc branch from 4e1ddbf to dbe6fca Jun 30, 2017
@yihui yihui added the feature label Jun 30, 2017
@yihui yihui force-pushed the feature/show-toc branch 2 times, most recently from cecb021 to be471d6 Jul 3, 2017
@yihui yihui force-pushed the feature/show-toc branch 2 times, most recently from 132bf32 to b47be96 Jul 11, 2017
@yihui yihui force-pushed the feature/show-toc branch from b47be96 to de81e09 Aug 14, 2017
@yihui yihui force-pushed the feature/show-toc branch from de81e09 to 85a341d Aug 29, 2017
@yihui yihui force-pushed the feature/show-toc branch from 85a341d to 3e341a9 Oct 8, 2017
@yihui yihui force-pushed the feature/show-toc branch from 3e341a9 to 429663d Oct 27, 2017
@yihui yihui force-pushed the feature/show-toc branch from 429663d to 858eb50 Mar 21, 2018
@yihui yihui force-pushed the feature/show-toc branch from 858eb50 to 1a94e25 Aug 30, 2018
@yihui yihui force-pushed the feature/show-toc branch from 1a94e25 to c47f304 Oct 1, 2018
@enersto
Copy link

@enersto enersto commented Feb 1, 2019

So there is still no toc_float for html_page?

@yihui yihui force-pushed the feature/show-toc branch from c47f304 to d940844 Mar 20, 2019
@yihui yihui force-pushed the feature/show-toc branch from d940844 to 3b9ba36 Apr 18, 2019
@yihui yihui force-pushed the feature/show-toc branch from 3b9ba36 to 0b814ed Mar 17, 2020
@yihui yihui force-pushed the feature/show-toc branch from 0b814ed to f43a399 Jul 24, 2020
@yihui yihui force-pushed the feature/show-toc branch from f43a399 to c5cd722 Oct 5, 2020
@yihui yihui force-pushed the feature/show-toc branch from c5cd722 to 7c8d7c3 Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants