Replies: 1 comment 1 reply
-
Welcome @mmoser18! 👋 It sounds a bit like you want something closer to https://github.com/stefanprobst/rehype-extract-toc |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use rehype-toc to generate me the table of contents of a help-page (which is converted from markdown using remark, remark-rehype etc.). It seems I need to use rehype-toc (instead of remark-toc) to generate correct and working cross-reference-links (i.e. links from the TOC to the referenced chapters that actually work).
However rehype-toc always places the TOC at the very beginning of the generated document. With remark-toc I had been able to specify a specific heading under which the TOC was to be placed. I would like to keep it that way, i.e. having my TOC only after an introductory chapter, not at the very beginning. I tried to read (and understand...) the misc. readme's, examples and discussions re. rehype-toc but found no such option nor any fitting example. Can that be done or is it hard-coded in rehype-toc that the generated TOC is prepended to the document?
Beta Was this translation helpful? Give feedback.
All reactions