ArcGIS\r\n details: Use the ArcGIS Maps SDK for JavaScript to build compelling web apps that unlock your data’s potential with interactive user experiences and stunning 2D and 3D visualizations.\r\n link: https://developers.arcgis.com/javascript/latest/\r\n target: \"_blank\"\r\n```\r\nIt runs well in dev, but when I deployed on gh-pages in a custom repository, the site comes like \\\u003Cusername\\>.github.io/\\\u003Crepo\\>/xxx.So I set base option in ./docs/.vitepress/config.mts, the logo.png runs well under this option.but in `index.md>home layout>features`,it didn't work.\r\nif add a \\\u003Crepo\\> before src link, worked but I should change it every time when add or remove a feature:\r\n```md\r\nfeatures:\r\n - title: \u003Cimg src= \"/gest_webgis/imgs/ArcGIS.png\" alt=\"ArcGIS\" class=\"inline-block\"/>ArcGIS\r\n details: Use the ArcGIS Maps SDK for JavaScript to build compelling web apps that unlock your data’s potential with interactive user experiences and stunning 2D and 3D visualizations.\r\n link: https://developers.arcgis.com/javascript/latest/\r\n target: \"_blank\"\r\n```\r\nHow can I use a `withBase` helper in vitepress within formatter in md files?\r\n\r\n### Reproduction\r\n\r\nwrite an img tag in `home layout > features>title`,set base option in ./docs/.vitepress/index.{js,mts}\r\n\r\n\r\n### Expected behavior\r\n\r\nthe /imgs/xxx.png should automatically change into ${baseUrl}/imgs/xxx.png at runtime or use withBase helper in home features\r\n\r\n### System Info\r\n\r\n```Text\r\nwin11, gitpub pages\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\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.",[2908],{"name":2909,"color":2910},"bug: pending triage","e99695",3139,"How to use a `withBase` helper in vitepress within formatter in md files?","2023-11-02T00:04:19Z","https://github.com/vuejs/vitepress/issues/3139",0.6852249,{"description":2917,"labels":2918,"number":2922,"owner":2877,"repository":2878,"state":2900,"title":2923,"updated_at":2924,"url":2925,"score":2926},"### Describe the bug\n\n单击 AntDesignVue Pagination 组件某页进行切换时,会导致当前页面会滚动到 Top。\n\n### Reproduction\n\n后排查发现 \\\u003Ca rel=\"nofollow\"> 这种也会起到锚链接的作用。但在其他非 vitepress 的 SPA 页面中使用,却不会有这个影响。我不太理解。\n\n### Expected behavior\n\n消除 \\\u003Ca rel=\"nofollow\"> 本不该有的 锚链接影响。\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.5\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 2.63 GB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node\r\n Yarn: 1.22.22 - /usr/local/bin/yarn\r\n npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm\r\n pnpm: 9.2.0 - /usr/local/bin/pnpm\r\n bun: 1.1.12 - /usr/local/bin/bun\r\n Browsers:\r\n Chrome: 125.0.6422.142\r\n Safari: 17.5\r\n npmPackages:\r\n vitepress: ^1.2.3 => 1.2.3\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2919],{"name":2920,"color":2921},"client","1AA9E5",3950,"使用 AntDesignVue Pagination 组件中,发现单击某个页数切换,会导致页面会回滚到 Top","2024-06-17T04:43:00Z","https://github.com/vuejs/vitepress/issues/3950",0.6852587,{"description":2928,"labels":2929,"number":2930,"owner":2877,"repository":2878,"state":2900,"title":2931,"updated_at":2932,"url":2933,"score":2934},"### Is your feature request related to a problem? Please describe.\n\nHello, I have a suggestion,\r\nAdd a column in the countdown to the end of the day to show the monthly salary,\r\nIs it one day off or two days off on the weekend.\r\n\r\n\n\n### Describe the solution you'd like\n\nsuggestion\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.",[],2521,"suggestion","2023-06-27T00:04:30Z","https://github.com/vuejs/vitepress/issues/2521",0.6892849,{"description":2936,"labels":2937,"number":2939,"owner":2877,"repository":2878,"state":2900,"title":2940,"updated_at":2941,"url":2942,"score":2943},"### Describe the bug\r\n\r\nIn the rewrites configuration,\r\n\r\nI mistakenly set 'test.md': '/pages/teste1.md' instead of 'test.md': 'pages/test1.md'. \r\n\r\nThis error allows the page to load correctly in the development environment but results in a 404 error upon refreshing.\r\n\r\nI acknowledge this as a simple mistake that caused me two days of confusion. \r\n\r\nI believe it would be helpful to have a validation check to catch such errors and provide a clear error message. Additionally, the rewrite rule works in development but fails in production. \r\n\r\nI am unsure if this usage is correct. Could you please review my demo for further assistance?\r\n\r\n[demo](https://stackblitz.com/edit/vite-t7umqm)\r\n\r\nMy project is a blog. \r\n\r\nI can access it through a new URL, but when navigating, the page still uses the old URL. \r\n\r\nThis behavior is abnormal. \r\n\r\nPlease check the [homepage](https://leelaa.cn) The[ branch page ](https://leelaa.cn/posts/ahAkCa) cannot be navigated properly from the homepage\r\n\r\nalthough the branch page is actually accessible.\r\n\r\n### Reproduction\r\n\r\n[demo](https://stackblitz.com/edit/vite-t7umqm)\r\n\r\n### Expected behavior\r\n\r\nI expect that all pages should function normally when navigating, and that the behavior should be consistent between production and development environments.\r\n\r\n### System Info\r\n\r\n```Text\r\nnode v16.20.2\r\n\r\nchrome:121.0.6167.86\r\n\r\nvitepress:1.0.0-rc.44\r\n\r\nos:windows\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\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.",[2938],{"name":2909,"color":2910},3596," I encountered regarding rewrites.","2024-04-28T12:25:28Z","https://github.com/vuejs/vitepress/issues/3596",0.6940324,{"description":2945,"labels":2946,"number":2950,"owner":2877,"repository":2878,"state":2900,"title":2951,"updated_at":2952,"url":2953,"score":2954},"### Describe the bug\r\n\r\nAfter launched the dev it thrown this exception:\r\n20:50:08 [vitepress] Internal server error: end of the stream or a document separator is expected at line 3, column 7:\r\n layout: home\r\n ^\r\n Plugin: vitepress\r\n File: /Users/feiron/Movies/CSKB_Hosting-master/docs/index.md\r\n at generateError (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:22356:10)\r\n at throwError (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:22362:9)\r\n at readDocument (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:23734:5)\r\n at loadDocuments (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:23777:5)\r\n at load$1 (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:23803:19)\r\n at Object.safeLoad (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:23826:10)\r\n at parse$5 (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:25053:17)\r\n at parseMatter (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:25162:17)\r\n at matter (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:25103:10)\r\n at md.render (file:///Users/feiron/Movies/CSKB_Hosting-master/node_modules/.store/vitepress@1.2.3/node_modules/vitepress/dist/node/serve-CEEKiiuH.js:25288:45)\r\n\r\nmeanwhile, the page rendered as 404;\r\nafter a refresh, it displayed the root markdown and ignored the frontmatter.\r\n\r\nhere's screenshots for comparison:\r\n\u003Cimg width=\"1792\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/53085628/7c14cd72-fc0c-489b-b9b1-168ca998bc38\">\r\n\r\nand here's what it should be:\r\n\u003Cimg width=\"1792\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/53085628/76692987-1127-4409-a555-d4e73b2d8486\">\r\n\r\nother screenshots: \r\n\u003Cimg width=\"433\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/53085628/0f382110-eed9-46ba-9ef5-2a82f99e0c7c\">\r\n\u003Cimg width=\"1073\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/53085628/8ae5c63c-a793-4fce-afc1-f860fd0ec3a3\">\r\n\r\n\r\n### Reproduction\r\n\r\nhere's the online repro:\r\nhttps://stackblitz.com/edit/vite-kcrtdk\r\n\r\n- \u003Cdel>Set up i18n\u003C/del> this step is not necessary\r\n- Set up a series of frontmatter which implements default theme layout in default language path\r\n- add \"features\" part after the layout setups\r\n- write some markdown and some HTML after the end of frontmatter\r\n- run in dev\r\n\r\n\r\n### Expected behavior\r\n\r\nthe rendered page should display as what set-up by layout preset.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 14.5\r\n CPU: (8) arm64 Apple M1\r\n Memory: 50.77 MB / 16.00 GB\r\n Shell: 3.2.57 - /bin/sh\r\n Binaries:\r\n Node: 20.9.0 - /usr/local/bin/node\r\n npm: 10.1.0 - /usr/local/bin/npm\r\n Browsers:\r\n Safari: 17.5\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.45 => 1.2.3\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nI've checked for duplicate but I don't know if there's any expression that represents to my same meaning.\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.",[2947],{"name":2948,"color":2949},"need more info","bdbefc",3971,"Render ignored frontmatter of layout in root page","2024-07-04T04:41:52Z","https://github.com/vuejs/vitepress/issues/3971",0.694315,{"description":2956,"labels":2957,"number":2958,"owner":2877,"repository":2878,"state":2900,"title":2959,"updated_at":2960,"url":2961,"score":2962},"### Is your feature request related to a problem? Please describe.\r\n\r\nVitepress by default allows the use of Vue components within markdown files, as referenced in the documentation: [Using Vue in Markdown](https://vitepress.dev/zh/guide/using-vue).\r\n\r\nThis is particularly useful, especially in the documentation for frontend developers.\r\n\r\nThe only downside is that the imported components need to be managed separately in their own files:\r\n\r\n```vue\r\n\u003Cscript setup>\r\nimport CustomComponent from '../../components/CustomComponent.vue'\r\n\u003C/script>\r\n```\r\n\r\nFor example, in the code above, you need to manually manage these external components. The general process might be to create a `components` directory and then implement the `CustomComponent.vue` component within it.\r\n\r\nIf this component is used in most markdown files, this approach is quite normal.\r\n\r\nHowever, when setting up my own blog site using Vitepress, I found that certain components in the markdown files are often closely related to the context in which they are inserted within the document. They are used to demonstrate specific content of that document.\r\n\r\nFor components with this purpose, placing them in separate files and then importing and registering them through `script setup` doesn't seem to be a good practice: when reading the component content alone, the context from the markdown document might be lost.\r\n\r\nFor a blog with a rather disorganized categorization, it seems there needs to be a better way to manage these external components.\r\n\r\n\r\n\r\n### Describe the solution you'd like\r\n\r\nI want to extend an inline vue block syntax that allows you to write components directly in markdown as SFC blocks, eliminating the need to manually manage external component files and import them. \r\n\r\nWhen writing a standard Vue code block, you typically use the following syntax:\r\n````\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cbutton>Original code\u003C/button>\r\n\u003C/template>\r\n```\r\n````\r\n\r\nThe inline Vue component is enabled based on the vue code block by configuring the 'Component' field to true with a JSON string\r\n\r\n\r\n````\r\n```vue { \"component\": true } \r\n\u003Cscript setup lang=\"ts\">\r\nimport { add } from './util'\r\nconst onClick = ()=>{\r\n alert(\"click me\")\r\n}\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cbutton class=\"bg-red-100\" @click=\"onClick\">click me\u003C/button>\r\n\u003C/template>\r\n\r\n\u003Cstyle scoped>\r\nbutton {\r\n color: red;\r\n}\r\n\u003C/style>\r\n```\r\n````\r\n\r\nThe above '{\"component\": true}' will extend the vue code block to build a vue SFC component running in markdown using the vite plugin, without any external files.\r\n\r\nInline components are identical to individually created SFC files and can access the current development environment, such as ts, unocss, other components, or tool modules.\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nI wrote a vite plugin to implement it, and now the code is running in my blog, [sourcecode](https://github.com/tangxiangmin/ShyMean/blob/master/.vitepress/plugins/md-sfc.ts) and [document](https://www.shymean.com/article/%E5%9C%A8VitePress%E4%B8%AD%E5%AE%9E%E7%8E%B0%E5%86%85%E8%81%94Vue%E7%BB%84%E4%BB%B6).\r\n\r\nthe options list\r\n* `component: boolean`, open inline component render\r\n* `name: string`, reuse this sfc block in current markdown file by the component name\r\n* `lazy: boolean`, lazy render the sfc block when manual `\u003CxxxComponentName />`\r\n\r\nWhat I want to discuss is \r\n* whether this feature is necessary or not. \r\n* If so, Whether the main branch can provide this feature\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.",[],3906,"Another way to use vue components in markdown file","2024-06-08T04:41:51Z","https://github.com/vuejs/vitepress/issues/3906",0.69710606,{"description":2964,"labels":2965,"number":2966,"owner":2877,"repository":2878,"state":2900,"title":2967,"updated_at":2968,"url":2969,"score":2970},"### Is your feature request related to a problem? Please describe.\n\nI can't find any solution to lazy load images. If I use markdown, vitepress will render the code to:\r\n``` HTML\r\n\u003Cimg src=\"\" alt=\"\">\r\n```\r\nI think it's better to add loading=\"lazy\" to \u003Cimg> tag. This solution doesn't need any plugin.\n\n### Describe the solution you'd like\n\nAlready said above.\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.",[],3316,"Add loading=\"lazy\" to \u003Cimg> tag to support native lazy load feature of browser.","2024-01-07T00:04:59Z","https://github.com/vuejs/vitepress/issues/3316",0.6986186,["Reactive",2972],{},["Set"],["ShallowReactive",2975],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fD_CQ10Qo_6KYaJsfV1vSB-1QeUze3eWcUmg9U4gY4xI":-1},"/vuejs/vitepress/2493"]