Skip to content

Commit

Permalink
Hast refactoring and new placeholder feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Jule Marcoueille committed Jan 6, 2021
1 parent d217f99 commit 182702a
Show file tree
Hide file tree
Showing 16 changed files with 7,335 additions and 728 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ The Rehype TOC plugin supports the following options:
|:---------------------|:-------------------|:----------------------|:-----------------------------------------
|`nav` |boolean |true |Determines whether the table of contents is wrapped in a `<nav>` element.
|`position` |string |"afterbegin" |The position at which the table of contents should be inserted, relative to the `<main>` or `<body>` element. Can be "beforebegin", "afterbegin", "beforeend", or "afterend". See [the `insertAdjacentElement()` docs](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement) for an explanation of each value.
|`placeholder` |string | |The optional placeholder string to replace with the table of contents.
|`headings` |array of strings |h1, h2, h3, h4, h5, h6 |The HTML heading tags to include in the table of contents
|`cssClasses.toc` |string |toc |The CSS class name for the top-level `<nav>` or `<ol>` element that contains the whole table of contents.
|`cssClasses.list` |string |toc-level |The CSS class name for all `<ol>` elements in the table of contents, including the top-level one.
Expand Down
Loading

0 comments on commit 182702a

Please sign in to comment.