Docusaurus Admonitions not working since upgrade from V2 to V3

37 views Asked by At

It was working on version 2, but from version 3, the admonitions are rendered in simple text, without the special design.

This is the package.json file:

{
  "name": "my-website",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "docusaurus": "docusaurus",
    "start": "docusaurus start",
    "build": "docusaurus build",
    "swizzle": "docusaurus swizzle",
    "deploy": "docusaurus deploy",
    "clear": "docusaurus clear",
    "serve": "docusaurus serve",
    "write-translations": "docusaurus write-translations",
    "write-heading-ids": "docusaurus write-heading-ids"
  },
  "dependencies": {
    "@algolia/events": "^4.0.1",
    "@docusaurus/core": "^3.1.1",
    "@docusaurus/plugin-google-tag-manager": "^3.1.1",
    "@docusaurus/preset-classic": "^3.1.1",
    "@mdx-js/react": "^1.6.21",
    "acorn": "^8.7.1",
    "clsx": "^1.1.1",
    "docusaurus-theme-search-typesense": "^0.15.0",
    "prism-react-renderer": "^1.2.1",
    "react": "^18.2.0",
    "react-chrono": "^1.13.2",
    "react-dom": "^18.2.0",
    "react-icons": "^4.3.1",
    "react-vertical-timeline-component": "^3.5.2"
  }
}

file.md:

:::danger
Deleting a Daily RDF or entire Dataset is an irreversible operation.
:::

It should show the correct design.

1

There are 1 answers

0
Pawel Kowaluk On

If you do the following, it should work:

:::danger

Deleting a Daily RDF or entire Dataset is an irreversible operation.

:::

I think doing it the way you did gets parsed as a single line and not treated as an admonition. This might be a change in the version of MDX.