\r\n```\r\n\r\nAlternatively, use the `desc` defined in the `container` to write Markdown syntax.\r\n\r\n```md\r\n::: demo src=\"../demo.vue\" title=\"Demo block\"\r\n\r\nThis is a `description` that can be written using Markdown.\r\n\r\n:::\r\n```\r\n\r\n### Describe the solution you'd like\r\n\r\nTo address this, I have created the [markdown-it-vitepress-demo](https://github.com/hairyf/markdown-it-vitepress-demo) plugin. I'm not sure if it can be helpful.\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n- https://github.com/vuejs/vitepress/issues/987\r\n- https://github.com/vuejs/vitepress/issues/1349\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2881],{"name":2868,"color":2869},2432,"feat(demo): built-in markdown plugin provides support for showcasing demo capabilities.","2024-07-17T14:37:26Z","https://github.com/vuejs/vitepress/issues/2432",0.7039058,{"description":2888,"labels":2889,"number":2896,"owner":2871,"repository":2872,"state":2873,"title":2897,"updated_at":2898,"url":2899,"score":2900},"### Is your feature request related to a problem? Please describe.\n\nCurrently using vitepress to render changelogs of a repository, and it has entries like:\n`Add \u003Cpartition>/gpu support to fsgen`\n\nwhich leads to missing end tag.\n\n\n\n### Describe the solution you'd like\n\nI believe adding a frontmatter config to parse elements in a MD or not, would be a good idea.\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\nhttps://github.com/vuejs/vitepress/issues/4216\n\nSeems to be stale, and I am not sure if this will be given any attention considering 4 months of inactivity on that issue.\n\n### Validations\n\n- [x] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [x] Read the [docs](https://vitepress.dev).\n- [x] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [x] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2890,2893],{"name":2891,"color":2892},"build","377ba8",{"name":2894,"color":2895},"has-workaround","1B4515",4622,"[FR] Frontmatter config to disable \u003C> tags parsing","2025-03-15T10:42:12Z","https://github.com/vuejs/vitepress/issues/4622",0.7133171,{"description":2902,"labels":2903,"number":2907,"owner":2871,"repository":2872,"state":2873,"title":2908,"updated_at":2909,"url":2910,"score":2911},"### Is your feature request related to a problem? Please describe.\r\n\r\nWhen I ported my MD document over, I encountered many problems and found that it was due to some\u003C>tags being incorrectly parsed (in fact, I didn't want them to be parsed). This has caused some trouble.\r\nThe example is as follows:\r\n~~~\r\n| 参数 | 含义 |\r\n| ----------------- | -------------------------------------------------- |\r\n| -d | 指定当前唯一通过 USB 连接的 Android 设备为命令目标 |\r\n| -e | 指定当前唯一运行的模拟器为命令目标 |\r\n| -s \u003CserialNumber>| 指定相应 serialNumber 号的设备/模拟器为命令目标 |\r\n\r\nAn error will be reported at this time:[plugin:vite:vue] Element is missing end tag.\r\n\r\nAlthough it can be solved by :| -s `\u003CserialNumber>`| ,\r\n~~~\r\n\r\n### Describe the solution you'd like\r\n\r\nI think simply prohibit parsing\u003C>in the table, is the simplest and most effective approach.I want to know how to disable parsing in a table.\r\n\r\nBecause I hope that documents that can be parsed normally in MD software such as Typora can be easily ported. The parsing of tags has caused some trouble.\r\n\r\n### Describe alternatives you've considered\r\n\r\nPerhaps globally banning the \"Using Vue in Markdown\" feature would also be effective?\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2904],{"name":2905,"color":2906},"needs more discussion","C2E0C6",4216,"Prohibit parsing\u003C>tags in markdown","2025-03-22T14:04:39Z","https://github.com/vuejs/vitepress/issues/4216",0.7254347,{"description":2913,"labels":2914,"number":2917,"owner":2871,"repository":2872,"state":2873,"title":2918,"updated_at":2919,"url":2920,"score":2921},"similar to vuepress",[2915,2916],{"name":2891,"color":2892},{"name":2868,"color":2869},3861,"i18n with markdown containers","2025-03-02T18:09:10Z","https://github.com/vuejs/vitepress/issues/3861",0.7295533,{"description":2923,"labels":2924,"number":2925,"owner":2871,"repository":2872,"state":2926,"title":2927,"updated_at":2928,"url":2929,"score":2930},"### Is your feature request related to a problem? Please describe.\n\nIs it possible to make the frontmatter variables can be used before the rendering of markdown? Like this:\r\n\r\n```md\r\n---\r\nsomeLink: https://some.link\r\n---\r\n\r\n[Awesome frontmatter link]({{ $frontmatter.someLink }})\r\n```\n\n### Describe the solution you'd like\n\nNow we're getting this:\r\n\r\n```html\r\n\u003Cp>[Awesome frontmatter link](https://some.link)\u003C/p>\r\n```\r\n\r\nI would like to get this:\r\n\r\n```html\r\n\u003Ca href=\"https://some.link\">\u003C/a>\r\n```\r\n\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],2240,"closed","Using the frontmatter variable with link","2023-04-24T00:04:04Z","https://github.com/vuejs/vitepress/issues/2240",0.6961103,{"description":2932,"labels":2933,"number":2937,"owner":2871,"repository":2872,"state":2926,"title":2938,"updated_at":2939,"url":2940,"score":2941},"### Is your feature request related to a problem? Please describe.\n\nCurrently markdown file insertion also includes (renders) the `frontmatter` data.\n\n### Describe the solution you'd like\n\nAdding an option to strip the `frontmatter` would help when we reuse the same markdown files.\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[2934],{"name":2935,"color":2936},"need more info","bdbefc",3091,"Strip `frontmatter` when a Markdown file inserted into another","2023-10-23T00:04:33Z","https://github.com/vuejs/vitepress/issues/3091",0.6969526,{"description":2943,"labels":2944,"number":2946,"owner":2871,"repository":2872,"state":2926,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Is your feature request related to a problem? Please describe.\r\n\r\nthere is no context info currently, such as `filepath`/`vite compiler`, when `markdown-it` parse markdown files, and this leads to the inability to resolve relative file path when parsing markdown files, or add dependency to compiler to make hmr work as expected\r\n\r\nfor example, `snippet`\r\n\r\nhttps://github.com/vuejs/vitepress/blob/ea6cb00c3e9099d45fc236bff0f7c42a65d558dc/src/node/markdown/plugins/snippet.ts?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L145-L147\r\n\r\n```js\r\n// loader always undefined\r\nif (loader) {\r\n loader.addDependency(src)\r\n}\r\n```\r\n\r\n### Describe the solution you'd like\r\n\r\nadd meta to [`markdown-it`](https://markdown-it.github.io/markdown-it/#MarkdownIt.render) be called) when [`render`](https://github.com/vuejs/vitepress/blob/ea6cb00c3e9099d45fc236bff0f7c42a65d558dc/src/node/markdown/markdown.ts?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L96-L105)\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\r\n- [X] Read the [docs](https://vitepress.vuejs.org/).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2945],{"name":2891,"color":2892},444,"add meta to markdown-it env","2023-01-21T14:28:39Z","https://github.com/vuejs/vitepress/issues/444",0.7074504,{"description":2952,"labels":2953,"number":2954,"owner":2871,"repository":2872,"state":2926,"title":2955,"updated_at":2956,"url":2957,"score":2958},"### Is your feature request related to a problem? Please describe.\r\n\r\nIssue 1: Is there a way or how to get the `md` instance (per-configured by VitePress) in Vue component\r\n- I know it might be impossible or being problematic because it's supposed to be run at build-time which is in Node.js, so I'm not expecting a yes answer here, but is there any better alternative way to do so?\r\n- Note due to some reason, I don't really want to write markdown straight away, instead I want to leverage the power of yaml format, and handle the transformation just once. (Since I don't want my team to ask me how to write certain md syntax with my custom component again and again, since `Vue in markdown` is not that straight forward for them). And defining API schemas by `yaml` makes more sense to me instead of writing markdown to document.\r\n\r\nIssue 2: I noticed that by my current implementation (see below), those data are not collected by `local (minisearch)` search. This might be because data collection is happening at build-time (not sure)? Is there any way to work around this?\r\n\r\n---\r\nMy use-case:\r\n\r\nImagine a custom layout here:\r\n```md\r\n---\r\nlayout: api # my custom layout\r\nrequests:\r\n - url: /getSecurityType\r\n method: post\r\n # ....\r\n\r\n - url: /getSecurityCategory\r\n method: post\r\n # ....\r\n---\r\n```\r\nFor example, I want to map the URL to `\u003Ch2>`, and also benefit from built-in VitePress features such as `aside`.\r\n\r\nBut I found out that normal h2 won't work, since `aside` is collecting only `h2` with children, which is the `#` link on the left by default. This makes sense, but it's a little bit hard for me to manually copy the dom.\r\n\r\nA comparison could be like:\r\nWhat I want:\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { useData } from 'vitepress';\r\nimport { md } from '???'; // This is what I want\r\nimport type { ApiFrontMatter } from '@theme/types/api';\r\nimport type { VitePressData } from 'vitepress';\r\nimport type { Ref } from 'vue';\r\n\r\nconst { frontmatter: fm } = useData() as VitePressData & { frontmatter: Ref\u003CApiFrontMatter> };\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv class=\"vp-doc\">\r\n \u003Ch1>{{ fm.setName }}\u003C/h1>\r\n\r\n \u003Ctemplate v-for=\"req in fm.requests\" :key=\"req.url\">\r\n \u003C!-- md instance imported from somewhere (that's what I want) -->\r\n {{ md.render(`## ${req.url}`) }}\r\n \u003C/template>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\nCurrently, I have to mimic it (although it works for styles and aside, but search data collection ignores them):\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { useData } from 'vitepress';\r\nimport type { ApiFrontMatter } from '@theme/types/api';\r\nimport type { VitePressData } from 'vitepress';\r\nimport type { Ref } from 'vue';\r\n\r\nconst { frontmatter: fm } = useData() as VitePressData & { frontmatter: Ref\u003CApiFrontMatter> };\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv class=\"vp-doc\">\r\n \u003Ch1>{{ fm.setName }}\u003C/h1>\r\n\r\n \u003Ctemplate v-for=\"req in fm.requests\" :key=\"req.url\">\r\n \u003Ch2 :id=\"req.url\">\r\n {{ req.url }}\r\n \u003Ca\r\n class=\"header-anchor\"\r\n :href=\"`#${req.url}`\"\r\n :aria-label=\"`Permalink to "${req.url}"`\"\r\n >\r\n ​\r\n \u003C/a>\r\n \u003C/h2>\r\n \u003C/template>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\n### Describe alternatives you've considered\r\n\r\nThe worst case is I need to write a custom `markdown-it` plugin and wrap all those yaml into a custom block and do the transformation there... But honestly that's gonna be a huge pain...\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],2605,"How to get the `md` instance (include all plugins defined) to parse my custom string in Vue component?","2023-08-15T00:04:17Z","https://github.com/vuejs/vitepress/issues/2605",0.70876557,{"description":2960,"labels":2961,"number":2962,"owner":2871,"repository":2872,"state":2926,"title":2963,"updated_at":2964,"url":2965,"score":2966},"### Is your feature request related to a problem? Please describe.\n\nI'm using VitePress to document our coding standards and our design system. I want to show examples of the code we would use (HTML and Vue components) *and* how that code would render.\r\n\r\nI can import and use Vue components in the markdown (and HTML) without issue. But to show both the \"live\" and \"source\" views of that code, I have to copy my live code into a separate markdown code block, which means now I have *two* blocks of code to manage and synchronize for each example.\n\n### Describe the solution you'd like\n\nI'd like a new directive for \"```\" code blocks that, when viewed in VitePress, shows up as a tabbed interface with two tabs: (1) the rendered version of that code (using the normal rendering done by VitePress, supporting Vue and HTML), and (2) the normal way the code block would be otherwise rendered.\r\n\r\nI *believe* this would simply require detecting this directive, duplicating the code within the block as non-fenced code, and wrapping the pair in a simple tabbed Vue component.\r\n\r\nObviously for more complex examples, the VitePress version of the live code will differ from what needs to be shown to the user, so that is a challenge (the Vue docs themselves have this challenge). But for simple examples of using Vue components and HTML with no additional script involved, it would really help.\r\n\r\nMy suggestion would be something like \"```html:live\", where the \":live\" bit either comes before or after any row number highlights (I don't think it would matter).\n\n### Describe alternatives you've considered\n\nCopying and pasting between markdown code blocks to markdown live code, keeping them synchronized as the code is updated.\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],554,"\"Live\" Code Blocks","2023-01-21T14:20:27Z","https://github.com/vuejs/vitepress/issues/554",0.72208315,["Reactive",2968],{},["Set"],["ShallowReactive",2971],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fVMNEYQypiSn7g--eNUlb7sy_T_wr-f6s9dUGv7kmGBI":-1},"/vuejs/vitepress/2410"]