hugo-toha.github.io icon indicating copy to clipboard operation
hugo-toha.github.io copied to clipboard

Posts' Table of Contents dosen't work with .rmd files

Open StellAuror opened this issue 2 years ago • 1 comments

Hello, I struggle with posts' Table of Contents.

As long as I use the standard .md format, everything works perfectly. But, when the same file is saved as .Rmd (R markdown, R is a programming language) and then render it as an .html file, the table of contents stops working, ie it does not recognize the document headers.

.html file rendered from the .rmd

image

.md file (same content as in the previous one)

image

btw Many thanks for the awesome theme!

StellAuror avatar Oct 29 '22 15:10 StellAuror

Hi @StellAuror, the Table Of Contents uses Hugo's .TableOfContents page variable. The TOC is generated by Hugo itself. I am suspecting Hugo is not generating it properly for .rmd files.

hossainemruz avatar Oct 30 '22 15:10 hossainemruz