\n\n请问使用的库打包文件中有Worker,但是打包环境没有worker切报错应该怎么解决?\n\n",[],4937,"构建时报错 Worker is not defined","2025-09-08T08:34:41Z","https://github.com/vuejs/vitepress/issues/4937",0.7645147,{"description":3205,"labels":3206,"number":3211,"owner":3149,"repository":3150,"state":3151,"title":3212,"updated_at":3213,"url":3214,"score":3215},"### Is your feature request related to a problem? Please describe.\r\n\r\nThere's a little different of layout among pages have y-scrollbar or not in wide screen device like desktop. \r\nFor example, if I switch pages like https://vitepress.vuejs.org/guide/theme-search.html and pages like https://vitepress.vuejs.org/guide/markdown.html , there will be a little quake , cause some components' width changed. \r\n\r\n### Describe the solution you'd like\r\n\r\noverwrite css rule... but many place to adjust, not only `#VPContent`\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.vuejs.org).\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.",[3207,3210],{"name":3208,"color":3209},"theme","0754FB",{"name":3146,"color":3147},1054,"Could it be better to adjust width of some html element ?","2025-03-02T18:11:37Z","https://github.com/vuejs/vitepress/issues/1054",0.77054125,{"description":3217,"labels":3218,"number":3220,"owner":3149,"repository":3150,"state":3151,"title":3221,"updated_at":3222,"url":3223,"score":3224},"I want to create an extra color palette. Is it possible? Similar to .dark in the custom style.css\r\nWhy? \r\nI want to have pages different color palettes depending on the path of my site. \r\nLet's say\r\n\r\n> site/tutorials/ = blue color palette\r\n> site/news/ = gray color palette\r\n\r\nHow can I achieve something like this? If not by path, at least by specifying it on each .md frontmatter.\r\n\r\nThanks in advance.",[3219],{"name":3146,"color":3147},4161,"Help adding a new style/color palette ","2024-09-29T09:05:46Z","https://github.com/vuejs/vitepress/issues/4161",0.77884114,{"description":3226,"labels":3227,"number":3229,"owner":3149,"repository":3150,"state":3151,"title":3230,"updated_at":3231,"url":3232,"score":3233},"### 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.",[3228],{"name":3146,"color":3147},4117,"Only index pages for searching under the same directory","2024-09-29T09:05:51Z","https://github.com/vuejs/vitepress/issues/4117",0.78153443,{"description":3235,"labels":3236,"number":3237,"owner":3149,"repository":3150,"state":3238,"title":3239,"updated_at":3240,"url":3241,"score":3242},"\r\n\r\n有大佬可以帮忙指导下这是什么问题吗",[],1387,"closed","最新版本出现这样","2023-01-21T14:25:27Z","https://github.com/vuejs/vitepress/issues/1387",0.7514749,{"description":3244,"labels":3245,"number":3246,"owner":3149,"repository":3150,"state":3238,"title":3247,"updated_at":3248,"url":3249,"score":3250},"### Is your feature request related to a problem? Please describe.\n\nI wrote a Markdown-it plugin, but when I register the plugin in defineConfig, it shows that the MarkdownIt type exported from markdown-it is incompatible with the internal types of VitePress.\r\n\r\nTherefore, should VitePress export a Markdown type internally to facilitate fixing type errors?\r\n\r\n\r\n\r\nmy `langPlugin.ts`\r\n\r\n```ts\r\nimport { getLogoTagString } from '../content'\r\nimport MarkdownIt from 'markdown-it';\r\n\r\nfunction langPlugin(md: MarkdownIt) {\r\n const temp = md.renderer!.rules!.fence!.bind(md.renderer.rules)\r\n md.renderer.rules.fence = (tokens, idx, options, env, slf) => {\r\n const token = tokens[idx]\r\n if (getLogoTagString(token.info)) {\r\n const result = token.info.match(/^\\b([\\w\\.]*)\\b/)\r\n if (!result)\r\n return temp(tokens, idx, options, env, slf)\r\n const [_, lang] = result\r\n const content = temp(tokens, idx, options, env, slf)\r\n const value = getLogoTagString(lang)\r\n return content.replace(`\u003Cspan class=\"lang\">${lang}\u003C/span>`, `\u003Cspan class=\"lang icon\">${value}\u003C/span>`)\r\n }\r\n\r\n return temp(tokens, idx, options, env, slf)\r\n }\r\n\r\n // insert icon before\r\n // https://github.com/vuejs/vitepress/blob/0c434bf537a64b06fc0bc630b4ee58b9fa67309b/src/node/markdown/plugins/containers.ts#L95\r\n const rawCodeGroupRender = md.renderer.rules['container_code-group_open']!\r\n \r\n md.renderer.rules['container_code-group_open'] = (tokens, idx, options, env, slf) => {\r\n const content: string = rawCodeGroupRender(tokens, idx, options, env, slf)\r\n // match: >index.ts\u003C/label>\r\n return content.replace(/>(\\s*[^\\\u003C\\>]*\\s*)\\\u003C\\/label\\>/g, (_, $1) => {\r\n return `>${getLogoTagString($1)} ${$1}\u003C/label>`\r\n })\r\n }\r\n}\r\n\r\nexport default langPlugin\r\n\r\n```\n\n### Describe the solution you'd like\n\n```diff\r\n- import MarkdownIt from 'markdown-it';\r\n+ import type { MarkdownIt } from 'vitepress'\r\nimport { getLogoTagString } from '../content'\r\n\r\nfunction langPlugin(md: MarkdownIt) {\r\n const temp = md.renderer!.rules!.fence!.bind(md.renderer.rules)\r\n md.renderer.rules.fence = (tokens, idx, options, env, slf) => {\r\n const token = tokens[idx]\r\n if (getLogoTagString(token.info)) {\r\n const result = token.info.match(/^\\b([\\w\\.]*)\\b/)\r\n if (!result)\r\n return temp(tokens, idx, options, env, slf)\r\n const [_, lang] = result\r\n const content = temp(tokens, idx, options, env, slf)\r\n const value = getLogoTagString(lang)\r\n return content.replace(`\u003Cspan class=\"lang\">${lang}\u003C/span>`, `\u003Cspan class=\"lang icon\">${value}\u003C/span>`)\r\n }\r\n\r\n return temp(tokens, idx, options, env, slf)\r\n }\r\n\r\n // insert icon before\r\n // https://github.com/vuejs/vitepress/blob/0c434bf537a64b06fc0bc630b4ee58b9fa67309b/src/node/markdown/plugins/containers.ts#L95\r\n const rawCodeGroupRender = md.renderer.rules['container_code-group_open']!\r\n \r\n md.renderer.rules['container_code-group_open'] = (tokens, idx, options, env, slf) => {\r\n const content: string = rawCodeGroupRender(tokens, idx, options, env, slf)\r\n // match: >index.ts\u003C/label>\r\n return content.replace(/>(\\s*[^\\\u003C\\>]*\\s*)\\\u003C\\/label\\>/g, (_, $1) => {\r\n return `>${getLogoTagString($1)} ${$1}\u003C/label>`\r\n })\r\n }\r\n}\r\n\r\nexport default langPlugin\r\n\r\n```\n\n### Describe alternatives you've considered\n\nNot yet.\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.",[],4146,"Support exporting in `MarkdownIt` interface to be compatible with Markdown plugins users have written themselves","2024-08-25T04:42:06Z","https://github.com/vuejs/vitepress/issues/4146",0.75630116,["Reactive",3252],{},["Set"],["ShallowReactive",3255],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fHAXa8oWT4flQeWJtIgXCxe7eqnKdTQ4anxZbzVvNJ6o":-1},"/vuejs/vitepress/4219"]