Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
show toc in a rmarkdown file? #58
Yes. You can add this to the YAML metadata of your Rmd document:
output: blogdown::html_page: toc: true
Full documentation at https://bookdown.org/yihui/blogdown/templates.html#how-to
EDIT: This is totally working, just I made some poor assumptions. For anyone who finds this in the future, don't render the .Rmd using knitr just use the
This ins't working for me.
Here is my YAML metadata:
I also tried substituting
I am using hugo version 0.20.7 on ubuntu, Rmarkdown version 1.5 and blogdown version 0.0.6 fwiw.
referenced this issue
Dec 7, 2017
@hezhaobin The problem for a checkbox in the New Post addin is that it is hard to tell what it should do in the case of plain Markdown posts (the implementation of TOC is theme-dependent).
For the floating TOC, it is also up to the specific Hugo theme. If you are familiar with HTML/CSS/JS, you could implement it by yourself.