\r\n\r\n\u003Cimg width=\"700\" alt=\"\" src=\"https://github.com/user-attachments/assets/a0d88f61-9edd-4d28-b60e-a6b8f5d25321\" />\r\n\r\nLooking back to color system PR [#2797](https://github.com/vuejs/vitepress/pull/2797) it seems as though `--vp-c-text-3` was not intended to be used with `--vp-c-bg-alt`\r\n\r\n> XXX-3: The color for solid background, such as bg color of the button. It must satisfy the contrast ratio with pure white (#ffffff) text on top of it\r\n\r\nI have a possible fix available and will submit a PR\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 14.5\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 5.63 GB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Browsers:\r\n Chrome: 131.0.6778.265\r\n Edge: 131.0.2903.112\r\n Safari: 17.5\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.",[],4486,"closed","Code block contrast ratio","2025-02-23T04:43:36Z","https://github.com/vuejs/vitepress/issues/4486",0.7231959,{"description":2910,"labels":2911,"number":2912,"owner":2863,"repository":2864,"state":2904,"title":2913,"updated_at":2914,"url":2915,"score":2916},"### Describe the bug\n\n在我编写一个.md文件时我是这么写的:\r\n\r\n```\r\n\u003Cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/NoNameGMM/SignInForMiraiMC?style=flat&label=License\r\n\"/>\r\n\u003Cimg alt=\"Minecraft Version\" src=\"https://img.shields.io/badge/Minecraft-1.8--1.20-blue?style=flat&color=green\"/>\r\n\u003Cimg alt=\"GitHub Release\" src=\"https://img.shields.io/github/v/release/NoNameGMM/SignInForMiraiMC?style=flat&label=Release\"/>\r\n```\r\n\r\n正常来说应该是这样:\r\n\u003Cimg width=\"249\" alt=\"photo1\" src=\"https://github.com/vuejs/vitepress/assets/109721871/d5c41be5-f3df-43f7-bd88-a2f12a11490f\">\r\n\r\n可是vitepress的效果是:\r\n\u003Cimg width=\"107\" alt=\"屏幕截图 2024-03-03 200157\" src=\"https://github.com/vuejs/vitepress/assets/109721871/a5b20517-2e3f-4fb0-9390-1f06cdbbebd6\">\r\n\r\n\r\n\n\n### Reproduction\n\n同上\n\n### Expected behavior\n\n我想要实现正常markdown的效果\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 11 10.0.22631\r\n CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics\r\n Memory: 1.68 GB / 13.86 GB\r\n Binaries:\r\n Node: 20.10.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.21 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 10.2.3 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 8.15.4 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n Browsers:\r\n Edge: Chromium (122.0.2365.59)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.44 => 1.0.0-rc.44\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.",[],3631,"使用shields.io徽标时图片自动换行","2024-03-11T00:04:39Z","https://github.com/vuejs/vitepress/issues/3631",0.7273457,{"description":2918,"labels":2919,"number":2920,"owner":2863,"repository":2864,"state":2904,"title":2921,"updated_at":2922,"url":2923,"score":2924},"### Is your feature request related to a problem? Please describe.\r\n\r\nI have modified the source code myself, but it needs to be customized again every time I upgrade. \r\nHope to add support for meta keywords.\r\n\r\n\r\n### Describe the solution you'd like\r\n\r\nTried to modify 7 files of the source code \r\n as shown below\r\n\u003Cimg width=\"351\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/25144943/28299ecd-66d2-4c8e-aea4-73932e16caed\">\r\n\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[vitepress1.0.2(改造版-支持md 内使用 keywords).zip](https://github.com/vuejs/vitepress/files/14831944/vitepress1.0.2.-.md.keywords.zip)\r\n\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.",[],3733,"Can support for meta keywords be added?","2024-04-28T12:25:04Z","https://github.com/vuejs/vitepress/issues/3733",0.7310697,{"description":2926,"labels":2927,"number":2931,"owner":2863,"repository":2864,"state":2904,"title":2932,"updated_at":2933,"url":2934,"score":2935},"### Describe the bug\r\n\r\nI am trying to convert X.org documentation to a _VitePress_ site.\r\n\r\nThe volume of content is _**very large**_ and I ended up generating a huge `sidar` object, that is about `12,430` lines when formatted. The serialized `sidebar` object is available here: [sidebar.json](https://github.com/vuejs/vitepress/files/13722347/sidebar.json)\r\n\r\nThe vitepress dev server can handle it pretty well. But when I try to bundle it, the build command will stuck at \"rendering pages\", and then crash after a few minutes. I've attached the full crash log in \"additional context\".\r\n\r\n### Cause of the problem\r\n\r\nI have verified the problem is introduced by the `sidebar` object because as soon as I exclude the sidebar object from the config object exported by `config.mjs`, the problem went away.\r\n\r\n### My thoughts\r\n\r\nAlthough the sidebar object is huge, I do not think it is large enough to crash Node.js. I am assuming the sidebar component of the default theme ran into circular reference when parsing the sidebar.\r\n\r\nIn addition, I have ruled out the possibility of a circular reference in my exported `sidebar` object by using `JSON.parse(JSON.stringify(sidebar))`.\r\n\r\n### Reproduction\r\n\r\n> This problem cannot be reproduced without generating actual \".md\" sources.\r\n\r\n#### 1. Clone and initialize the project\r\n\r\n```sh\r\ngit clone https://github.com/zhangyx-lab/x-doc.git -b bug-reproduce --depth 1\r\ncd x-doc && npm install\r\n```\r\n\r\n> #### Optional: Download cached resources so the next command do not need to fetch from [x.org](www.x.org)\r\n>\r\n> Run following commands under `x-doc/`:\r\n>\r\n> ```sh\r\n> wget https://github.com/zhangyx-lab/x-doc/releases/download/v1.0-beta.0/caches.tar.gz && \\\r\n> tar -xzf caches.tar.gz\r\n> ```\r\n\r\n#### 2. Run \"setup\" to generate markdown source tree\r\n\r\n> [!WARNING]\r\n> This command takes a few minutes and will occupy all your CPUs\r\n\r\n```sh\r\nnode setup\r\n```\r\n\r\n#### 3. Now you can verify the project under dev server (should work fine):\r\n\r\n```sh\r\nnpm run dev # You can look around and the sidebar should be rendered correctly\r\n```\r\n\r\n#### 4. And reproduce the problem by building for distribution:\r\n\r\n```sh\r\nnpm run build # Will crash\r\n```\r\n\r\n### Expected behavior\r\n\r\nShould build just fine, since dev server worked fine.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 14.0\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 65.84 MB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\nBinaries:\r\n Node: 20.8.0 - /opt/homebrew/bin/node\r\n npm: 10.1.0 - /opt/homebrew/bin/npm\r\n pnpm: 8.10.3 - ~/Library/pnpm/pnpm\r\nBrowsers:\r\n Chrome: 120.0.6099.109\r\n Safari: 17.0\r\nnpmPackages:\r\n vitepress: ^1.0.0-rc.32 => 1.0.0-rc.32\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n### Crash scene (command: `npm run build`)\r\n\r\n```plaintext\r\n> prebuild\r\n> mkdir -p var\r\n\r\n\r\n> build\r\n> vitepress build docs\r\n\r\n\r\n vitepress v1.0.0-rc.32\r\n\r\n- building client + server bundles...\r\n\r\n(!) Some chunks are larger than 500 kB after minification. Consider:\r\n- Using dynamic import() to code-split the application\r\n- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks\r\n- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.\r\n✓ building client + server bundles...\r\n- rendering pages...\r\n\r\n\u003C--- Last few GCs --->\r\n\r\n[87992:0x130008000] 147271 ms: Scavenge 4000.3 (4126.8) -> 3995.5 (4126.8) MB, 17.46 / 0.00 ms (average mu = 0.344, current mu = 0.336) allocation failure; \r\n[87992:0x130008000] 147290 ms: Scavenge 4006.3 (4126.8) -> 4001.8 (4127.0) MB, 9.62 / 0.00 ms (average mu = 0.344, current mu = 0.336) allocation failure; \r\n[87992:0x130008000] 147371 ms: Scavenge 4012.7 (4127.5) -> 4008.2 (4133.0) MB, 68.54 / 0.00 ms (average mu = 0.344, current mu = 0.336) allocation failure; \r\n\r\n\r\n\u003C--- JS stacktrace --->\r\n\r\nFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory\r\n 1: 0x102fa3a04 node::Abort() [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 2: 0x102fa4d58 node::ModifyCodeGenerationFromStrings(v8::Local\u003Cv8::Context>, v8::Local\u003Cv8::Value>, bool) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 3: 0x103111898 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 4: 0x103111848 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 5: 0x1032a4134 v8::internal::Heap::CallGCPrologueCallbacks(v8::GCType, v8::GCCallbackFlags, v8::internal::GCTracer::Scope::ScopeId) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 6: 0x1032a6b78 v8::internal::Heap::ComputeMutatorUtilization(char const*, double, double) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 7: 0x1032a4dd8 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 8: 0x1032a2c64 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n 9: 0x10329ac24 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n10: 0x10329b390 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n11: 0x10328428c v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n12: 0x10358fcc0 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n13: 0x102de0c44 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n14: 0x10ad70438 \r\n15: 0x10b7ea7e8 \r\n16: 0x10b8f2430 \r\n17: 0x10b3a89c8 \r\n18: 0x10ad70150 \r\n19: 0x10b7ea7e8 \r\n20: 0x10b790a18 \r\n21: 0x10acda120 \r\n22: 0x10b6e589c \r\n23: 0x10b562ad4 \r\n24: 0x10b7eb38c \r\n25: 0x10b70be14 \r\n26: 0x10b7eb150 \r\n27: 0x10b70be14 \r\n28: 0x10b562b68 \r\n29: 0x10b790a5c \r\n30: 0x10acda120 \r\n31: 0x10b09f100 \r\n32: 0x10b971b80 \r\n33: 0x10b528d18 \r\n34: 0x10b738c3c \r\n35: 0x10acda120 \r\n36: 0x10b09f100 \r\n37: 0x10b749ea8 \r\n38: 0x10acda120 \r\n39: 0x10b6e589c \r\n40: 0x10b562ad4 \r\n41: 0x10acda5c0 \r\n42: 0x10b6e589c \r\n43: 0x10b562ad4 \r\n44: 0x10acda3d8 \r\n45: 0x10b6e589c \r\n46: 0x10b6e0fb0 \r\n47: 0x10b7555e0 \r\n48: 0x102d8f210 Builtins_AsyncFunctionAwaitResolveClosure [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n49: 0x102e3cfb8 Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n50: 0x102d7eb94 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n51: 0x102d563f4 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n52: 0x1032308e4 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n53: 0x103230d74 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n54: 0x103251d80 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n55: 0x103251bb4 v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n56: 0x102ed0bd4 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n57: 0x102fab36c node::fs::FileHandle::CloseReq::Resolve() [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n58: 0x102fabe14 node::fs::FileHandle::ClosePromise()::$_0::__invoke(uv_fs_s*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n59: 0x102f9ce64 node::MakeLibuvRequestCallback\u003Cuv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n60: 0x105f8b360 uv__work_done [/opt/homebrew/Cellar/libuv/1.46.0/lib/libuv.1.dylib]\r\n61: 0x105f8e994 uv__async_io [/opt/homebrew/Cellar/libuv/1.46.0/lib/libuv.1.dylib]\r\n62: 0x105f9e294 uv__io_poll [/opt/homebrew/Cellar/libuv/1.46.0/lib/libuv.1.dylib]\r\n63: 0x105f8ee28 uv_run [/opt/homebrew/Cellar/libuv/1.46.0/lib/libuv.1.dylib]\r\n64: 0x102ed1a40 node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n65: 0x102feadfc node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n66: 0x102feab54 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n67: 0x102f6c888 node::Start(int, char**) [/opt/homebrew/Cellar/node/20.8.0/bin/node]\r\n68: 0x181cc5058 start [/usr/lib/dyld]\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.",[2928],{"name":2929,"color":2930},"bug: pending triage","e99695",3362,"Node crashes when building default theme - \"JavaScript heap out of memory\"","2024-01-03T00:04:40Z","https://github.com/vuejs/vitepress/issues/3362",0.73159236,{"description":2937,"labels":2938,"number":2940,"owner":2863,"repository":2864,"state":2904,"title":2941,"updated_at":2942,"url":2943,"score":2944},"### Describe the bug\n\n导航到`https://onekjs.github.io/onek-ui/components/icon//`中,加载不到资源,网页卡死 \r\n\r\n\r\n\n\n### Reproduction\n\n我在源码中发现如下代码\r\n`src/client/app/utils.ts `\r\npathToFile\r\n```js\r\n pagePath =\r\n sanitizeFileName(\r\n pagePath.slice(base.length).replace(/\\//g, '_') || 'index'\r\n ) + '.md'\r\n // client production build needs to account for page hash, which is\r\n // injected directly in the page's html\r\n let pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]\r\n```\r\n这里 pagePath 解析为\"components_icon__index.md\" __VP_HASH_MAP__为\r\n\r\n所以 pageHash 为 undefined,所以 sanitizeFileName(\r\n pagePath.slice(base.length).replace(/\\//g, '_') || 'index'\r\n ) + '.md'这里可以优化下\n\n### Expected behavior\n\n页面不被卡死,路由重定向\n\n### System Info\n\n```sh\nwindows 64位 chorme 版本 114.0.5735.134(正式版本) (64 位)\n```\n\n\n### Additional context\n\n我是用vitepress最新版本调试的\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.",[2939],{"name":2929,"color":2930},2549,"route 没有导航到正确的路由,网页卡死","2023-07-17T00:04:58Z","https://github.com/vuejs/vitepress/issues/2549",0.73746145,{"description":2946,"labels":2947,"number":2951,"owner":2863,"repository":2864,"state":2904,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Describe the bug\n\nThe Vitepress documentation lacks proper guidance on the usage of useCopyCode hook, which is essential for implementing copy-to-clipboard functionality in code blocks.\n\n### Reproduction\n\n1. Navigate to the Vitepress documentation site.\r\n2. Look for documentation related to useCopyCode hook or copy-to-clipboard functionality.\r\n3. Observe the absence of clear instructions or examples on how to use useCopyCode.\n\n### Expected behavior\n\nThe Vitepress documentation should provide comprehensive guidance, including usage examples and explanations, for the useCopyCode hook, enabling users to easily implement copy-to-clipboard functionality in their projects.\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (4) x64 Intel(R) Pentium(R) CPU N4200 @ 1.10GHz\r\n Memory: 2.03 GB / 7.83 GB\r\n Binaries:\r\n Node: 20.10.0 - C:\\Program Files\\nodejs\\node.EXE\r\n npm: 10.2.3 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Chromium (123.0.2420.65)\r\n Internet Explorer: 11.0.19041.3636\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.45 => 1.0.0-rc.45\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.",[2948],{"name":2949,"color":2950},"need more info","bdbefc",3734,"useCopyCode Documentation","2024-04-28T12:25:14Z","https://github.com/vuejs/vitepress/issues/3734",0.746284,["Reactive",2957],{},["Set"],["ShallowReactive",2960],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0Hmom1lsgMv3Z1-DJcmUBnfsnOKedooTqQwjlsQzkDI":-1},"/vuejs/vitepress/3073"]