`, but how should I find the exact cause from the error log? It does not provide any useful details (see below screenshot)\r\n\r\n---\r\n\r\nAnother question, as I guess my error is because of this:\r\nShould I wrap `watch()` inside `onMounted()`? or in another word, can I do it? I didn't find any corresponding example in Vue documentation... \r\nSorry if this is a dumb question, as I'm a react guy :(\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { useLocalStorage } from '@vueuse/core';\r\nimport { watch } from 'vue';\r\n\r\nconst nfcapiEnvRef = useLocalStorage('vp-nfcapi-env', 'staging', {\r\n deep: false,\r\n listenToStorageChanges: true,\r\n writeDefaults: true\r\n});\r\n\r\nwatch(nfcapiEnvRef, (value, oldValue) => {\r\n const htmlDataSet = document.documentElement.dataset;\r\n oldValue && (htmlDataSet.nfcapiEnv = oldValue.toLowerCase());\r\n htmlDataSet.nfcapiEnv = value.toLowerCase();\r\n}, { immediate: true });\r\n\u003C/script>\r\n```\r\n\r\n---\r\n\r\nScreenshot of the error:\r\n\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nThis is not a bug, but a question\r\n\r\n### Expected behavior\r\n\r\nN/A\r\n\r\n### System Info\r\n\r\n```sh\r\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz\r\n Memory: 30.87 GB / 63.84 GB\r\n Binaries:\r\n Node: 18.16.0 - C:\\NodeJS\\node.EXE\r\n Yarn: 1.22.19 - C:\\NodeJS\\yarn.CMD\r\n npm: 9.8.0 - C:\\NodeJS\\npm.CMD\r\n pnpm: 8.6.7 - C:\\NodeJS\\pnpm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.82)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: ^1.0.0-beta.5 => 1.0.0-beta.5\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nN/A\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2941],{"name":2942,"color":2943},"question","5D5FAE",2627,"How should I trace build error?","2023-07-24T00:04:51Z","https://github.com/vuejs/vitepress/issues/2627",0.71557325,{"description":2950,"labels":2951,"number":2953,"owner":2871,"repository":2872,"state":2922,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Discussed in https://github.com/vuejs/vitepress/discussions/1255\r\n\r\n\u003Cdiv type='discussions-op-text'>\r\n\r\n\u003Csup>Originally posted by **akil-rails** August 30, 2022\u003C/sup>\r\nCurrently there is a global configuration to display Line numbers in all code blocks: https://vitepress.vuejs.org/guide/markdown#line-numbers\r\n\r\nIt will be great to have line numbers only for some code blocks, and not for all. \r\n\r\nIn certain cases (like for [example](https://docs.apigee.com/api-platform/troubleshoot/runtime/500-badformdata)) the code block is showing a sample message; which doesn't need line numbers. \u003C/div>",[2952],{"name":2882,"color":2883},1256,"Line Numbers Only for some Code Blocks","2023-01-21T14:17:05Z","https://github.com/vuejs/vitepress/issues/1256",0.7217311,{"description":2959,"labels":2960,"number":2961,"owner":2871,"repository":2872,"state":2922,"title":2962,"updated_at":2963,"url":2964,"score":2965},"### Is your feature request related to a problem? Please describe.\n\n我想要通过一些控制语句实现`markdown`文档的快速编写,比如这样:\r\n```html\r\n// XXX.md\r\n---\r\nsidebar: false\r\n---\r\n\u003Cscript setup>\r\nimport { beijing } from '../const/imgLink.ts'\r\n\u003C/script>\r\n# 标题一 \r\n\r\n\u003Cdiv v-for='item in beijing'>\r\n ## {{item[0].title}}\r\n \u003Cmany-pictures :srcImgs='item' :lazy='true' />\r\n\u003C/div>\r\n```\r\n但显然`# 标题一 `可以被成功渲染为标题,而`## {{item[0].title}}`却只能是纯文本,因为这部分根本不会经过`markdown`渲染器的渲染。\n\n### Describe the solution you'd like\n\n我理解是否可以添加一个标识,比如:\r\n```js\r\n\u003Cdiv v-for='item in beijing'>\r\n ## {{item[0].title}}\r\n ::: markdown-block\r\n ## title\r\n // content\r\n ::: \r\n \u003Cmany-pictures :srcImgs='item' :lazy='true' />\r\n\u003C/div>\r\n\r\n```\r\n然后预期中这个块会被`markdown`渲染器渲染之后再交给`vue`相关的编译器去解析。\r\n如果可以支持这个功能,结合`vue`中的`v-if/v-for`等条件控制语句,可以帮助我实现许多页面的快速编写\n\n### Describe alternatives you've considered\n\n目前我只能直接在`v-for`语句中编写纯`html`语法的内容,这对于我来说有一定的心智负担,还是以上述的例子来说,这是我目前的替代方案:\r\n```html\r\n---\r\nsidebar: false\r\n---\r\n\u003Cscript setup>\r\nimport { beijing } from '../const/imgLink.ts'\r\n\u003C/script>\r\n# 标题一\r\n\u003Cdiv v-for='item in beijing'>\r\n \u003Ch2 :id=\"item[0].title\" tabindex=\"-1\">\r\n {{item[0].title}}\r\n \u003Ca class=\"header-anchor\" :href=\"`#${item[0].title}`\" aria-hidden=\"true\">#\u003C/a>\r\n \u003C/h2>\r\n \u003Cmany-pictures :srcImgs='item' :lazy='true' />\r\n\u003C/div>\r\n```\n\n### Additional context\n\n我也许可以尝试实现该功能\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.",[],1570,"在模板语法或标签语法中,是否可以增加一个类似块一样的标识,以至于块中的内容可以被`markdown`解析器识别并渲染为`html`","2023-01-21T14:20:46Z","https://github.com/vuejs/vitepress/issues/1570",0.7220909,{"description":2967,"labels":2968,"number":2970,"owner":2871,"repository":2872,"state":2922,"title":2971,"updated_at":2972,"url":2973,"score":2974},"### Describe the bug\n\nWhen I enable the `ignoreDeadLinks` option in `/docs/.vitepress/config.js`, `yarn docs:build` still fails with the reason being `One or more pages contain dead links.`\n\n### Reproduction\n\nCreate a new vitepress project.\r\nIn `/docs/.vitepress/config.js`:\r\n```js\r\nexport default {\r\n ignoreDeadLinks: true,\r\n title: \"test\",\r\n description: \"test stuff\"\r\n}\r\n```\r\n\r\nIn `/docs/api/index.md`:\r\n```md\r\n[test](./test)\r\n```\n\n### Expected behavior\n\nIt is expected that the build process will succeed, because it should ignoreDeadLinks instead of failing because of them.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz \r\n Memory: 6.63 GB / 15.93 GB\r\n Binaries:\r\n Node: 18.5.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - C:\\Program Files\\nodejs\\yarn.CMD\r\n npm: 8.15.0 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.71) \r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4\n```\n\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2969],{"name":2931,"color":2932},1084,"ignoreDeadLinks doesn't work","2023-01-21T14:30:01Z","https://github.com/vuejs/vitepress/issues/1084",0.7286526,["Reactive",2976],{},["Set"],["ShallowReactive",2979],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fShv7pOmNGwOhHEt4J_6yOZ70aaCusPf1kKX_fBbSNlk":-1},"/vuejs/vitepress/1792"]