\r\n\r\n::: zh-CN\r\n中文\r\n:::\r\n\r\n::: en\r\nEnglish\r\n:::\r\n```\r\n\r\nThis reduces maintenance costs.\r\n\r\nI came up with a very low cost implementation - [CSS-I18N](https://github.com/valaxyjs/css-i18n)\r\nAnd I implemented it in my own project [valaxy](https://github.com/YunYouJun/valaxy).\r\n\r\nIt works well. You can preview it [here](https://valaxy.site/guide/i18n).\r\nAnd this is my implementation: [How to realize CSS i18n?](https://valaxy.site/posts/i18n#css-i18n-another-solution)\r\n\r\n---\r\n\r\nIt is very cost-effective and I hope to integrate it with vitepress.\r\nIf you agree with my proposal, please let me know and I can create a PR for vitepress.\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/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.",[3020],{"name":3021,"color":3022},"stale","ededed",3047,"vuejs","vitepress","open","CSS i18n in one page","2025-03-02T18:10:37Z","https://github.com/vuejs/vitepress/issues/3047",0.7437202,{"description":3032,"labels":3033,"number":3038,"owner":3024,"repository":3025,"state":3026,"title":3039,"updated_at":3040,"url":3041,"score":3042},"### Describe the bug\r\n\r\nwhen using a `[slug].md` and `[slug].paths.js` file for dynamic routes the `[slug].paths.js` file doesnt seem to get access to the magic `resolve.alias[\"alias-goes-here\"] = \"/the/actual/file.js\"` stuff.\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-lt2rg5?file=docs%2F.vitepress%2Fconfig.ts,docs%2F.vitepress%2Fhello.js,docs%2F[slug].paths.js\r\n\r\n```js\r\n vite: {\r\n clearScreen: false,\r\n resolve: {\r\n alias: {\r\n '~hello': fileURLToPath(new URL('./hello.js', import.meta.url)),\r\n },\r\n },\r\n },\r\n```\r\n\r\n```js\r\nimport hello from '~hello';\r\n\r\nexport default {\r\n paths() {\r\n return [{ params: { slug: hello } }];\r\n },\r\n};\r\n```\r\n\r\n```sh\r\nfailed to load config from /home/projects/vite-lt2rg5/docs/[slug].paths.js\r\nInvalid paths file export in /home/projects/vite-lt2rg5/docs/[slug].paths.js. Expects default export of an object with a \"paths\" property.\r\n```\r\n\r\nif i remove the `import hello from \"~hello\"` line the error goes away\r\n```js\r\n// import hello from '~hello';\r\n\r\nexport default {\r\n paths() {\r\n return [{ params: { slug: 'hello' } }];\r\n },\r\n};\r\n```\r\n\r\n### Expected behavior\r\n\r\ni should be able to `import hello from \"~hello\"` and have it work, right?\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 18.18.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.4.2 - /usr/local/bin/npm\r\n pnpm: 8.9.2 - /usr/local/bin/pnpm\r\n npmPackages:\r\n vitepress: latest => 1.0.0-rc.23\r\n```\r\n\r\n\r\n### Additional context\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.",[3034,3037],{"name":3035,"color":3036},"build","377ba8",{"name":3021,"color":3022},3125,"custom resolve alias not available in .paths.js file","2025-03-02T18:10:30Z","https://github.com/vuejs/vitepress/issues/3125",0.7515359,{"description":3044,"labels":3045,"number":3047,"owner":3024,"repository":3025,"state":3026,"title":3048,"updated_at":3049,"url":3050,"score":3051},"### Is your feature request related to a problem? Please describe.\n\nWhen viewing a certain part of content, if you want to view the corresponding translated chapter content and click the translation link to jump, if you bring the hash value, you can locate the content you want to view more quickly. I think this would be very convenient.\n\n### Describe the solution you'd like\n\nPerhaps we can monitor changes in hash values and dynamically update translation links, or we can also provide a configuration for users to configure themselves.\r\n\r\nI don’t seem to see the relevant configuration on the official website. If there is any relevant configuration, I haven’t found it. I hope I can get your tips. Thank you.\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.",[3046],{"name":3021,"color":3022},2958,"Can the hash value be included when the translation link jumps?","2025-03-02T18:10:51Z","https://github.com/vuejs/vitepress/issues/2958",0.75806373,{"description":3053,"labels":3054,"number":3056,"owner":3024,"repository":3025,"state":3026,"title":3057,"updated_at":3058,"url":3059,"score":3060},"### Is your feature request related to a problem? Please describe.\n\nI started using VitePress a long time ago, about 4 years back. I don't want to waste developers' time listening to me ramble, but the main reason I'm bringing this up is that I've accumulated a lot of notes. \r\n\r\nEvery time I publish a new note, I have to manually add the blog path in Sider, which is really inconvenient! I just want to write notes, and filling in the note path in Sider is a hassle for me. \r\n\r\nOf course, I noticed this issue: https://github.com/vuejs/vitepress/issues/572#issuecomment-1170116225\r\n\r\nBut it seems like it would require more work, which just adds to the burden of writing my notes!\n\n### Describe the solution you'd like\n\nI just want to happily take notes without worrying about file paths. I hope vitepress can intelligently analyze the note paths and stop making the note authors stress over this.\r\n\r\nFor example, if vitepress knows all the locations of my notes, then it should refresh the content of the sider and nav every time it builds.\r\n\r\nPlease don't overlook this issue. Thanks! \r\n\r\nThe number of notes users have keeps increasing over time, and users migrating from other frameworks face this problem even more. They need to manually fill in a lot of sider and nav, which raises their costs. \r\n\r\nPlease don't ignore this issue. Thank you!\n\n### Describe alternatives you've considered\n\nnull\n\n### Additional context\n\nnull\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.",[3055],{"name":3021,"color":3022},4229,"[feature] Request vitepress to automatically generate a sider from the file directory","2024-10-26T17:17:16Z","https://github.com/vuejs/vitepress/issues/4229",0.7620448,{"description":3062,"labels":3063,"number":3067,"owner":3024,"repository":3025,"state":3068,"title":3069,"updated_at":3070,"url":3071,"score":3072},"### Describe the bug\n\nInstead of italic font rendering, only regular font is displayed in Safari.\n\n### Reproduction\n\nWrite a markdown with _italic rendering_, and open in Safari.\n\n### Expected behavior\n\nExpected to render italic font.\n\n### System Info\n\n```shell\nnot important\n```\n\n\n### Additional context\n\nRelevant issue: https://github.com/vuejs/vitepress/issues/759\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.",[3064],{"name":3065,"color":3066},"theme","0754FB",1558,"closed","Italic font rendering doesn't work in Safari","2023-01-21T14:17:11Z","https://github.com/vuejs/vitepress/issues/1558",0.73202425,{"description":3074,"labels":3075,"number":3079,"owner":3024,"repository":3025,"state":3068,"title":3080,"updated_at":3081,"url":3082,"score":3083},"### 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.",[3076],{"name":3077,"color":3078},"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.73508084,{"description":3085,"labels":3086,"number":3088,"owner":3024,"repository":3025,"state":3068,"title":3089,"updated_at":3090,"url":3091,"score":3092},"### Is your feature request related to a problem? Please describe.\n\nFor my theme which extends the default theme, I want to have a contact page with a custom layout.\n\n### Describe the solution you'd like\n\n###### Users\r\n\r\n```markdown\r\n---\r\nlayout: contact\r\n---\r\n\r\n# Contact\r\n\r\ncontent\r\n```\r\n\r\n###### Devs\r\n\r\nEffectively add custom blocks here\r\n\r\nhttps://github.com/vuejs/vitepress/blob/c30e758585ef512eef68b33918832d4413839e9c/src/client/theme-default/components/VPContent.vue#L29-L52\r\n\r\nFor example\r\n\r\n```vue\r\n\u003CMyContact v-if=\"frontmatter.layout === 'contact'\">\r\n \u003C!-- define slots for this layout, if any -->\r\n\u003C/MyContact>\r\n```\r\n\r\n---\r\n\r\nThis needs a lot of consideration, but I might propose something like\r\n\r\n```typescript\r\nimport Contact from \"./components/MyContact.vue\";\r\n\r\nexport default \u003CTheme>{\r\n // ...\r\n customLayouts: {\r\n contact: Contact,\r\n },\r\n};\r\n```\r\n\r\nThen in VPContent,\r\n\r\n```vue\r\n\u003Ccomponent v-else-if=\"customLayouts[frontmatter.layout]\" :is=\"customLayouts[frontmatter.layout]\">\u003C/component>\r\n```\n\n### Describe alternatives you've considered\n\n- Override the VPContent component - very fragile coupling\r\n- Use the page layout with a custom frontmatter key under which additional layouts can be specified - cannot control `Content`, workaround hack\r\n\r\n###### Users\r\n\r\n```markdown\r\n---\r\nlayout: page\r\ntype: contact\r\n---\r\n\r\n# Contact\r\n\r\ncontent\r\n```\r\n\r\n###### Devs\r\n\r\n*MyLayout.vue*\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003CLayout>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'about'\" #page-top>\r\n about page top\r\n \u003C/template>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'about'\" #page-bottom>\r\n about page bottom\r\n \u003C/template>\r\n\r\n \u003Ctemplate v-if=\"frontmatter.type === 'contact'\" #page-top>\r\n contact page top\r\n \u003C/template>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'contact'\" #page-bottom>\r\n contact page bottom\r\n \u003C/template>\r\n \u003C/Layout>\r\n\u003C/template>\r\n```\r\n\r\n```\r\nAn element cannot have multiple '\u003Ctemplate>' elements which are distributed to the same slot.eslint[vue/valid-v-slot](https://eslint.vuejs.org/rules/valid-v-slot.html)\r\n```\r\n\r\nOR\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003CLayout>\r\n \u003Ctemplate #page-top>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'about'\">\r\n about page top\r\n \u003C/template>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'contact'\">\r\n contact page top\r\n \u003C/template>\r\n \u003C/template>\r\n\r\n \u003Ctemplate #page-bottom>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'about'\">\r\n about page bottom\r\n \u003C/template>\r\n \u003Ctemplate v-if=\"frontmatter.type === 'contact'\">\r\n contact page bottom\r\n \u003C/template>\r\n \u003C/template>\r\n \u003C/Layout>\r\n\u003C/template>\r\n```\r\n\r\n(Terrible maintainability)\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.",[3087],{"name":3065,"color":3066},2547,"Provide a way for extending themes to add layouts","2023-08-14T00:04:21Z","https://github.com/vuejs/vitepress/issues/2547",0.7356021,{"description":3094,"labels":3095,"number":3096,"owner":3024,"repository":3025,"state":3068,"title":3097,"updated_at":3098,"url":3099,"score":3100},"https://github.com/vuejs/vitepress/blob/e6f9dd33c73411ded5461670f68ed4fe8c5923fa/src/node/plugin.ts#L405-L408\r\n\r\nthis doesn't consider rewrites",[],4172,"watchers not being triggered on data updates in pages with rewrites","2024-09-09T04:43:00Z","https://github.com/vuejs/vitepress/issues/4172",0.7411089,{"description":3102,"labels":3103,"number":3105,"owner":3024,"repository":3025,"state":3068,"title":3106,"updated_at":3107,"url":3108,"score":3109},"### Describe the bug\n\nWhen I run `vitepress build docs`, an error comes out\r\n``` shell\r\nPS D:\\Ysh\\Repos\\ysh-ui-proj\\proj\\ysh-ui> npm run docs:build\r\n\r\n> ysh-ui@0.0.1 docs:build\r\n> vitepress build docs\r\n\r\nvitepress v1.0.0-alpha.4\r\n⠼ building client + server bundles...\r\n(!) Some chunks are larger than 500 KiB 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/guide/en/#outputmanualchunks\r\n- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.\r\n✓ building client + server bundles...\r\n✖ rendering pages...\r\nbuild error:\r\n ReferenceError: location is not defined\r\n at Module.\u003Canonymous> (D:\\Ysh\\Repos\\ysh-ui-proj\\proj\\ysh-ui\\docs\\.vitepress\\.temp\\app.js:4087:12)\r\n at Module._compile (node:internal/modules/cjs/loader:1095:14)\r\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)\r\n at Module.load (node:internal/modules/cjs/loader:975:32)\r\n at Function.Module._load (node:internal/modules/cjs/loader:816:12)\r\n at ModuleWrap.\u003Canonymous> (node:internal/modules/esm/translators:201:29)\r\n at ModuleJob.run (node:internal/modules/esm/module_job:183:25)\r\n at async Loader.import (node:internal/modules/esm/loader:178:24)\r\n at async renderPage (file:///D:/Ysh/Repos/ysh-ui-proj/proj/ysh-ui/node_modules/vitepress/dist/node/serve-05342c3d.js:39534:25)\r\n at async build (file:///D:/Ysh/Repos/ysh-ui-proj/proj/ysh-ui/node_modules/vitepress/dist/node/serve-05342c3d.js:39853:9)\r\n```\n\n### Reproduction\n\nI have import a component form `ysh-ui\\docs\\.vitepress\\theme\\components`, my component need load `location.hash` when create.\r\n``` ts\r\nlet hash: string = location.hash.slice(1);\r\n```\n\n### Expected behavior\n\nIs it the cause of SSR? \n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19043\r\n CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz\r\n Memory: 3.28 GB / 15.89 GB\r\n Binaries:\r\n Node: 16.5.0 - C:\\Program Files\\nodejs\\node.EXE \r\n Yarn: 1.22.19 - C:\\Program Files\\nodejs\\yarn.CMD \r\n npm: 7.19.1 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)\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.",[3104],{"name":3077,"color":3078},1017,"location is not defined","2023-01-21T14:30:21Z","https://github.com/vuejs/vitepress/issues/1017",0.74493635,{"description":3111,"labels":3112,"number":3113,"owner":3024,"repository":3025,"state":3068,"title":3114,"updated_at":3115,"url":3116,"score":3117},"when use some new language blocks in `md`, such as `wgsl`, it shows `No language registration for wgsl`\r\n\r\nThe shiki support add custom languages: https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki\r\n\r\nThen, how to use it in VitePress to add custom languages?",[],1331,"How to add register language/grammar for shiki?","2023-01-21T14:25:07Z","https://github.com/vuejs/vitepress/issues/1331",0.7487875,["Reactive",3119],{},["Set"],["ShallowReactive",3122],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f8BIh-UpX5O3xvz8FbRDV9Mf0YzmrYrem5VTqVLqNkWY":-1},"/vuejs/vitepress/738"]