How to show the table of contents - #7
Open
yihui wants to merge 2 commits into
Open
Conversation
yihui
force-pushed
the
feature/show-toc
branch
2 times, most recently
from
July 9, 2017 17:46
cecb021 to
be471d6
Compare
yihui
force-pushed
the
feature/show-toc
branch
2 times, most recently
from
July 13, 2017 07:08
132bf32 to
b47be96
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
August 14, 2017 20:28
b47be96 to
de81e09
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
August 29, 2017 03:02
de81e09 to
85a341d
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
October 8, 2017 14:24
85a341d to
3e341a9
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
October 27, 2017 03:17
3e341a9 to
429663d
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
August 30, 2018 15:02
858eb50 to
1a94e25
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
October 1, 2018 14:33
1a94e25 to
c47f304
Compare
|
So there is still no toc_float for html_page? |
yihui
force-pushed
the
feature/show-toc
branch
2 times, most recently
from
October 11, 2020 20:57
c5cd722 to
7c8d7c3
Compare
yihui
force-pushed
the
feature/show-toc
branch
from
February 5, 2024 14:59
c77e803 to
b1927ae
Compare
|
Hi, Just wondering if there’s any reason this hasn’t been merged into the master branch yet. I’m really looking forward to using this feature, but keeping it maintained downstream has been a bit inconvenient. I think it would be great to have it supported out of the box upstream. Thanks a lot for your work on this theme — really appreciate it.. Happy coding. |
Owner
Author
|
@phnaharris The reason is here: https://yihui.org/en/2017/09/pull-requests-as-a-teaching-tool/ These PRs are often simple enough and I'll leave them to you to merge by yourself. Thanks for the nice words! |
yihui
force-pushed
the
feature/show-toc
branch
from
December 15, 2025 14:44
91762e7 to
433b5cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It depends on whether your post is R Markdown or plain Markdown. For R Markdown, it is easy -- just add this to YAML:
Example: https://deploy-preview-7--hugo-xmin.netlify.com/post/2017/06/22/rmd-toc/
For plain Markdown posts, the template
single.htmlhas to be modified. For example, we can use a YAML parametertocto 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).