Skip to content

How to avoid mdx-code-block showing up in TOC? #10409

Discussion options

You must be logged in to vote

What you want is:

  • Render Markdown
  • Render it to pure markup as if it's not actual content (i.e. no TOC, no other structural extraction we may do)

This is not a use case Docusaurus supports out of the box. What I suggested was:

Instead of this:

```mdx-code-block
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
```

Do this:

<h1>Changelog</h1>
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.co…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@andreacfromtheapp
Comment options

@Josh-Cena
Comment options

Answer selected by andreacfromtheapp
@andreacfromtheapp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants