on the Nesting Problem of MD Files #3105
-
├─ docs
│ ├─ .vitepress
│ ├─ B.md
│ ├─ A.md
│ └─ index.md
└─ package.json In the index.md file, the code is as follows, and it uses the include nesting syntax with two Markdown files.
In the A.md file,
B.md also contains a
This will result in an error:
The error occurs because you should have only one What is the issue with this? My intention is to split a single Markdown file into multiple Markdown files to reduce the code volume in a single file and make it easier to locate specific sections of code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Vue can't handle multiple script blocks. Import those markdown files instead of including them if you want to keep script blocks in separate files. |
Beta Was this translation helpful? Give feedback.
Like I said, you can "import" them if you want them to behave like vue components. Refer this example - https://stackblitz.com/edit/vite-sclc3e?file=docs/b.md,docs/a.md,docs/index.md