\n```\n\n> 可以解析:\n\n```md\n\u003Cimg src=\"./img/gmzyjx-a.png\" style=\"zoom:60%;\" />\n\n\n```\n\n### Reproduction\n\n\n\n### Expected behavior\n\n\u003Cimg src=\"img/gmzyjx-a.png\" style=\"zoom:60%;\" /> 这种写法正常应该能解析才对,这是符合html标准的\n\n### System Info\n\n```Text\nnpm warn Unknown user config \"home\". This will stop working in the next major version of npm.\nNeed to install the following packages:\nenvinfo@7.14.0\nOk to proceed? (y) y\n\n\n System:\n OS: Windows 10 10.0.19045\n CPU: (8) x64 Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz\n Memory: 4.10 GB / 15.96 GB\n Binaries:\n Node: 22.11.0 - C:\\Program Files\\nodejs\\node.EXE \n Yarn: 1.22.22 - ~\\AppData\\Roaming\\npm\\yarn.CMD \n npm: 11.2.0 - C:\\Program Files\\nodejs\\npm.CMD \n pnpm: 10.6.2 - ~\\AppData\\Roaming\\npm\\pnpm.CMD \n Browsers: {}\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\n```\n\n### Additional context\n\n\n\n> package.json\n\n```json\n{\n \"devDependencies\": {\n \"vitepress\": \"^1.6.3\",\n \"vue\": \"^3.5.13\"\n },\n \"scripts\": {\n \"dev\": \"vitepress dev\",\n \"build\": \"vitepress build\",\n \"preview\": \"vitepress preview\"\n }\n}\n```\n\n\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.",[2881],{"name":2882,"color":2883},"upstream","BF29ED",4618,"部分图片写法无法解析","2025-03-12T06:17:09Z","https://github.com/vuejs/vitepress/issues/4618",0.7625542,{"description":2890,"labels":2891,"number":2895,"owner":2871,"repository":2872,"state":2873,"title":2896,"updated_at":2897,"url":2898,"score":2899},"### Is your feature request related to a problem? Please describe.\n\nIt isn't really an _issue_ per say, more just an optional feature that I think would come in handy for me and others _if_ they wanted it.\r\n\r\nI guess the _issue_ is that the search function always indexes all pages no matter what directory you are under - but that may be confusing to some people if they want to search for a specific keyword and are only expecting it to return results from the directory they are under.\n\n### Describe the solution you'd like\n\nI'm not sure if it's entirely possible, because directories in each VitePress project are completely separate - but I was hoping that developers could have a 'list' of strings which each of their directories, so...\r\n\r\n- /docs/manuals\r\n- /docs/guides\r\n- /docs/api\r\n\r\nOr something along the lines above, then whenever a user browsers to one of those directories and searches, it only returns keywords within the same directory if that makes sense?\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.",[2892],{"name":2893,"color":2894},"stale","ededed",4117,"Only index pages for searching under the same directory","2024-09-29T09:05:51Z","https://github.com/vuejs/vitepress/issues/4117",0.772186,{"description":2901,"labels":2902,"number":2910,"owner":2871,"repository":2872,"state":2873,"title":2911,"updated_at":2912,"url":2913,"score":2914},"Today I was trying to integrate Algolia Search but found it hard how to use environment variables until I stumbled upon [the General Workflow for Connecting to a CMS](https://vitepress.dev/guide/cms#general-workflow)\n\nLet's add a section about how to use such environment variables.\nI will try opening a PR to add a section for environment variables configuration on the VitePress reference page and wait for your suggestions\n\nThanks,",[2903,2906,2909],{"name":2904,"color":2905},"docs","0075ca",{"name":2907,"color":2908},"contribution welcome","11E4B8",{"name":2893,"color":2894},4516,"Using Environment Variables In VitePress","2025-03-02T18:07:48Z","https://github.com/vuejs/vitepress/issues/4516",0.77529436,{"description":2916,"labels":2917,"number":2919,"owner":2871,"repository":2872,"state":2873,"title":2920,"updated_at":2921,"url":2922,"score":2923},"### Is your feature request related to a problem? Please describe.\r\n\r\nright now the appearance has the following type:\r\n\r\n```\r\nappearance?: boolean | 'dark' | 'force-dark' | 'force-auto' | (Omit\u003CUseDarkOptions, 'initialValue'> & {\r\n initialValue?: 'dark';\r\n });\r\n```\r\nthe `Omit\u003CUseDarkOptions, 'initialValue'>` allows to have only valueDark and valueLight, but it does not allow me to have other modes different than dark/light such as custom mode created by the developer giving further color customisation to the theme: light|dark|luxury|business and so on.\r\n\r\n### Describe the solution you'd like\r\n\r\ni would like to have the possibility to use multiple modes in addition to dark/light. so that the appearance type becomes something like:\r\n\r\n```\r\ninterface Appearance\u003CT extends string> {\r\n appearance?: boolean | 'dark' | 'force-dark' | 'force-auto' | (Omit\u003CUseColorModeOptions\u003CT>, 'initialValue'> & {\r\n initialValue?: 'dark';\r\n });\r\n}\r\n```\r\n\r\nwhere T is a union type of color modes like 'light'|'dark'|'luxury'|'business' that the developer will specify\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\nif this is not possible please provide a solution in the case where:\r\n1) I override the theme switcher with a custom theme switcher created by me containing different modes\r\n2) I still have to keep the appearance to be not false in the config.ts else the switcher will disappear\r\n\r\nmy current workaround is to use the `vitepress-theme-appearance` as `storageKey` in my custom component\r\n```\r\n type AvailableTheme = 'light' | 'dark' | 'gourmet';\r\n\r\nconst theme = useColorMode\u003CAvailableTheme>({\r\n attribute: 'data-theme',\r\n storageKey: 'vitepress-theme-appearance',\r\n modes: {\r\n // custom colors\r\n light: 'light',\r\n dark: 'dark',\r\n gourmet: 'gourmet',\r\n },\r\n initialValue: 'dark',\r\n});\r\n```\r\n\r\nthat would be fine if the component would not be a part of a vue components package i am building. yeah, i could still pass the storageKey as props and let the developer handle it if needed, but it might not be the best option.\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.",[2918],{"name":2893,"color":2894},4471,"allow multiple different color modes in addition to light|dark for themes","2025-03-02T18:07:55Z","https://github.com/vuejs/vitepress/issues/4471",0.7827656,{"description":2925,"labels":2926,"number":2931,"owner":2871,"repository":2872,"state":2873,"title":2932,"updated_at":2933,"url":2934,"score":2935},"### Describe the bug\r\n\r\nHi,\r\nI´m trying to create a dockerimage to serve out vitepress generated files, but the resulting site doesn´t include /vue. So the search function (and others) doesn´t´work.\r\n\r\n\r\nThe docker build is multistage, so first configure the builder and generate the files (in dev mode it works), and then copy the /dist folder (output folder) to /var/www/my-site and use the nginx template in vitepress docs (slightly modified with custom folders)\r\n\r\n### Reproduction\r\n\r\nFROM node:current-alpine as builder\r\n\r\nWORKDIR /builder\r\n\r\nRUN apk update\r\n\r\nCOPY \u003Cdocu-repo>/.site/package.json /builder/\r\nCOPY \u003Cdocu-repo>/.site/.vitepress/config.mts /builder/.vitepress/\r\nCOPY --exclude=\u003Cdocu-repo>/.site/ --exclude=.github/ --exclude=.gitignore --exclude=Dockerfile --exclude=.git/ . /builder/docs/ \r\nRUN npm install\t\r\n\r\nRUN npm run docs:build\r\n\r\n\r\nFROM nginx:1.27.1-alpine\r\n\r\n\r\nCOPY --from=builder /builder/.vitepress/dist /var/www/docs\r\nRUN chown -R nginx:nginx /var/www/ -R\r\nCOPY ./.site/nginx/nginx.conf /etc/nginx/conf.d/default.conf\r\n\r\n### Expected behavior\r\n\r\nThe site should work as in dev mode (vue components work as intended)\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Linux 5.10 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)\r\n CPU: (28) x64 13th Gen Intel(R) Core(TM) i7-13850HX\r\n Memory: 21.44 GB / 24.77 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 22.8.0 - ~/.nvm/versions/node/v22.8.0/bin/node\r\n npm: 10.8.2 - ~/.nvm/versions/node/v22.8.0/bin/npm\r\n npmPackages:\r\n vitepress: @1.3.4 => 1.3.4\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.",[2927,2930],{"name":2928,"color":2929},"bug: pending triage","e99695",{"name":2893,"color":2894},4219,"Copying generated file to www folder to be served by nginx doesn´t work ","2024-10-26T17:17:17Z","https://github.com/vuejs/vitepress/issues/4219",0.7830761,{"description":2937,"labels":2938,"number":2946,"owner":2871,"repository":2872,"state":2873,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Describe the bug\r\n\r\nUsing `@babylonjs/loaders` will cause an error during the build phase: `KHR_animation_pointer.data.js`: config must export or return an object.\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-v1c8np4w\r\n\r\nRun `npm run docs:build`.\r\n\r\n### Expected behavior\r\n\r\nThe error \"config must export or return an object\" should not occur.\r\n\r\nRemoving `import '@babylonjs/loaders'` will prevent any errors from occurring.\r\n\r\nI suspect it might be due to the filename `KHR_animation_pointer.data.js`, which might cause VitePress to mistakenly identify it as a `data loader`, leading to this error.\r\n\r\nIf my guess is correct, might there be a need for a way to exclude specific files?\r\n\r\n### System Info\r\n\r\n```Text\r\n@babylonjs/loaders: 7.43.0\r\nvitepress: 1.5.0\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n> vitepress build docs\r\n\r\n\r\n vitepress v1.5.0\r\n\r\n⠇ building client + server bundles...failed to load config from /home/projects/vite-v1c8np4w/node_modules/@babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js\r\nx Build failed in 3.63s\r\n✖ building client + server bundles...\r\nbuild error:\r\n[commonjs--resolver] Could not load /home/projects/vite-v1c8np4w/node_modules/@babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js: config must export or return an object.\r\n[commonjs--resolver] Could not load /home/projects/vite-v1c8np4w/node_modules/@babylonjs/loaders/glTF/2.0/Extensions/KHR_animation_pointer.data.js: config must export or return an object.\r\n at Module.loadConfigFromFile (file:///home/projects/vite-v1c8np4w/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:66589:13)\r\n at async Object.load (file:///home/projects/vite-v1c8np4w/node_modules/vitepress/dist/node/chunk-DMuPggCS.js:44533:21)\r\n \r\n \r\n\r\n\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.",[2939,2942,2943],{"name":2940,"color":2941},"build","377ba8",{"name":2893,"color":2894},{"name":2944,"color":2945},"needs more discussion","C2E0C6",4482,"Using babylonjs/loaders, the error \"config must export or return an object\" occurs","2025-03-02T18:07:54Z","https://github.com/vuejs/vitepress/issues/4482",0.7847908,{"description":2952,"labels":2953,"number":2955,"owner":2871,"repository":2872,"state":2873,"title":2956,"updated_at":2957,"url":2958,"score":2959},"### Describe the bug\n\nI'm using vitepress's nodejs api, but one problem is that if I call build twice, the second time there will be the wrong cache, causing the built index.html to still be the old result from the first time.\r\n\r\n```ts\r\nimport { mkdir, readFile, writeFile } from 'fs/promises'\r\nimport path from 'path'\r\nimport { build } from 'vitepress'\r\nimport { it, expect } from 'vitest'\r\n\r\nconst tempPath = path.resolve(__dirname, '.temp')\r\n\r\nit('should build', async () => {\r\n await mkdir(tempPath, { recursive: true })\r\n await writeFile(path.resolve(tempPath, 'index.md'), '# test 1')\r\n await build(tempPath, {\r\n outDir: path.resolve(tempPath, 'dist'),\r\n })\r\n expect(\r\n await readFile(path.resolve(tempPath, 'dist/index.html'), 'utf-8'),\r\n ).include('test 1')\r\n await writeFile(path.resolve(tempPath, 'index.md'), '# test 2')\r\n await build(tempPath, {\r\n outDir: path.resolve(tempPath, 'dist'),\r\n })\r\n expect(\r\n await readFile(path.resolve(tempPath, 'dist/index.html'), 'utf-8'),\r\n ).include('test 2') // AssertionError: expected '\u003C!DOCTYPE html>\\n\u003Chtml lang=\"en-US\" d…' to include 'test 2'\r\n})\r\n```\n\n### Reproduction\n\n1. `git clone https://github.com/rxliuli/vitepress-error-demo`\r\n2. `pnpm i`\r\n3. `pnpm vitest`\n\n### Expected behavior\n\nThe cache should be cleared during the second build\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 13.3\r\n CPU: (12) arm64 Apple M2 Max\r\n Memory: 10.56 GB / 64.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.10.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 10.2.3 - /usr/local/bin/npm\r\n pnpm: 8.12.1 - /usr/local/bin/pnpm\r\n Watchman: 2023.08.14.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Brave Browser: 115.1.56.11\r\n Chrome: 120.0.6099.109\r\n Safari: 16.4\r\n npmPackages:\r\n vitepress: 1.0.0-rc.32 => 1.0.0-rc.32\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.",[2954],{"name":2893,"color":2894},3363,"bug: Repeated builds will result in incorrect cache","2025-03-02T18:10:05Z","https://github.com/vuejs/vitepress/issues/3363",0.79251736,{"description":2961,"labels":2962,"number":2963,"owner":2871,"repository":2872,"state":2964,"title":2965,"updated_at":2966,"url":2967,"score":2968},"### Is your feature request related to a problem? Please describe.\n\n近期想用github pages搭建个人博客,先选的hexo,后选的vitepress。默认情况下,hexo会将新文章自动发表到首页,不需要配置路由,vitepress需要配置路由并展示在侧边栏。\r\n\r\nRecently I want to use github pages to build a personal blog, first selected hexo, then selected vitepress. By default, hexo automatically publishes new articles to the front page without the need to configure a route, while vitepress needs to configure a route and display it in the sidebar.\n\n### Describe the solution you'd like\n\n弱化路由功能,或者增加插件来绕开路由,直接将文章发布到主页并分页。使用侧边栏的模式适合做文档,不适合做博客。\r\n\r\nWeaken the routing function, or add plugins to bypass the routing and publish articles directly to the home page and page. The sidebar model is good for documentation, not for blogging.\n\n### Describe alternatives you've considered\n\n我搜索了issue,发现 #1297 ,但是还是围绕侧边栏展开,不能自动发表。\r\n\r\nI searched the issue and found #1297, but it was still around the sidebar and not automatically published.\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.",[],3814,"closed","能否像hexo一样,新文章自动发布到首页且不需要配置路由","2024-05-02T04:41:45Z","https://github.com/vuejs/vitepress/issues/3814",0.7426894,{"description":2970,"labels":2971,"number":2973,"owner":2871,"repository":2872,"state":2964,"title":2974,"updated_at":2975,"url":2976,"score":2977},"### Describe the bug\r\n\r\nwhen i using the default theme with default font, the **bold** is not visible.\r\n\r\n\r\n\r\nodd\r\n\r\n### Reproduction\r\n\r\nit seems like it's ok in vitepress.new, but i cant view the bold effect, i don' know why.\r\nhere are some code snippet\r\n```javascript\r\n// .vitepress/theme/index.js\r\n// https://vitepress.dev/guide/custom-theme\r\nimport { h } from 'vue'\r\nimport DefaultTheme from 'vitepress/theme'\r\nimport './style.css'\r\n\r\n/** @type {import('vitepress').Theme} */\r\nexport default {\r\n extends: DefaultTheme,\r\n Layout: () => {\r\n return h(DefaultTheme.Layout, null, {\r\n // https://vitepress.dev/guide/extending-default-theme#layout-slots\r\n })\r\n },\r\n enhanceApp({ app, router, siteData }) {\r\n // ...\r\n }\r\n}\r\n```\r\n```javascript\r\n//.vitepress/config.mjs\r\nexport default defineConfig({\r\n title: \"📚 Handbook\",\r\n lang: \"zh-CN\",\r\n logo: \"/images/SubIT-Normal.svg\",\r\n description: \"this is SubIT Handbook Project\",\r\n head: [\r\n ['link', { rel: 'icon', href: '/favicon.ico' }]\r\n ],\r\n...\r\n}\r\n```\r\n\r\n### Expected behavior\r\n\r\nshow the **Bold effect**\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Linux 6.5 Arch Linux\r\n CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900H\r\n Memory: 18.05 GB / 31.08 GB\r\n Container: Yes\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.9.0 - /usr/bin/node\r\n npm: 10.2.3 - /usr/bin/npm\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.24 => 1.0.0-rc.24 \r\nBrowser:\r\nMicrosoft Edge for Business\r\n119.0.2151.44 (release) (64 bits)\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.",[2972],{"name":2928,"color":2929},3177,"Bold Not visible","2023-11-11T00:04:11Z","https://github.com/vuejs/vitepress/issues/3177",0.7620876,["Reactive",2979],{},["Set"],["ShallowReactive",2982],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$faszwJQvmheRGqsKJu5TkxaDUEwzkQdIEy9NLVDakaTQ":-1},"/vuejs/vitepress/3928"]