\n \u003Ca href=\"#alt-slug\">#\u003C/a>\n\u003C/h1>\n```\n\n\u003Cdetails>\u003Csummary>Current behavior\u003C/summary>\n\u003Cp>\n\n`# ` should result in \n```html\n\u003Ch1 id>\n \u003Cimg src=\"path\" alt=\"alt\" />\n \u003Ca href=\"#\">#\u003C/a>\n\u003C/h1>\n```\n\n\u003C/p>\n\u003C/details> \n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n(should work for `\u003Ch\u003C2-7>>` too)\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.",[],4561,"Feature | Image as headline should use alt slug as id","2025-02-23T04:43:39Z","https://github.com/vuejs/vitepress/issues/4561",0.7555285,{"description":2921,"labels":2922,"number":2923,"owner":2872,"repository":2873,"state":2907,"title":2924,"updated_at":2925,"url":2926,"score":2927},"### Describe the bug\n\nTrying to have the project root outside the package directory leads to build errors as node is unavailable.\n\n### Reproduction\n\nI have the following directory structure:\r\n```text\r\n. # document root\r\n├─ .vitepress # config dir & node root \r\n ├─ config.mts\r\n ├─ package.json # node Package config\r\n └─ ...\r\n├─ en_US # documentation in english\r\n └─ ... # Markdown files and subdirectories\r\n├─ de_DE # documentation in german\r\n └─ ... # Markdown files and subdirectories\r\n```\r\nDue to the nature of the project I am working on, vitepress has to run in a yarn workspace. The current location for the workspace using vuepress is in the `.vuepress` folder. The directory structure is analogue to the one above. When executing `npx vitepress build ..` in the `.vitepress` directory some imports cannot be resolved. I believe, this is due to code beeing executed in `.` where `vue is unavailable`.\r\n\r\nIs there a way to solve this, or is it just not reasonable to have the node config below the document root. \n\n### Expected behavior\n\nI would expect the code to be executed in the cwd and therefore all imports beeing available.\n\n### System Info\n\n```Text\nOS: Manjaro Linux 6.6.19-1-MANJARO\r\nnode: v21.6.2\r\nvue: 3.4.21\r\nvitepress: 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.",[],3667,"Unable to build with project root above package directory","2024-04-28T12:27:39Z","https://github.com/vuejs/vitepress/issues/3667",0.76505977,{"description":2929,"labels":2930,"number":2934,"owner":2872,"repository":2873,"state":2907,"title":2935,"updated_at":2936,"url":2937,"score":2938},"### Describe the bug\n\nActuall I am using one pakage in vue component and I am importing my vue component in vitepress then when I am trying to build I am getting this error\r\n\r\n(!) Some chunks are larger than 500 kBs after minification. Consider:\r\n\r\nUsing dynamic import() to code-split the application\r\nUse build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks\r\nAdjust chunk size limit for this warning via build.chunkSizeWarningLimit.\r\n✓ building client + server bundles...\r\n⠙ rendering pages...ReferenceError: document is not defined\r\nat enableDismissTrigger (C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:826:21)\r\nat C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:908:3\r\nat C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:7:83\r\nat Object. (C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:10:3)\r\nat Module._compile (node:internal/modules/cjs/loader:1101:14)\r\nat Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)\r\nat Module.load (node:internal/modules/cjs/loader:981:32)\r\nat Function.Module._load (node:internal/modules/cjs/loader:822:12)\r\nat ModuleWrap. (node:internal/modules/esm/translators:190:29)\r\nat ModuleJob.run (node:internal/modules/esm/module_job:185:25)\r\n✖ rendering pages...\r\nbuild error:\r\nReferenceError: document is not defined\r\nat enableDismissTrigger (C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:826:21)\r\nat C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:908:3\r\nat C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:7:83\r\nat Object. (C:\\ArunSk\\aswin\\node_modules\\bootstrap\\dist\\js\\bootstrap.js:10:3)\r\nat Module._compile (node:internal/modules/cjs/loader:1101:14)\r\nat Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)\r\nat Module.load (node:internal/modules/cjs/loader:981:32)\r\nat Function.Module._load (node:internal/modules/cjs/loader:822:12)\r\nat ModuleWrap. (node:internal/modules/esm/translators:190:29)\r\nat ModuleJob.run (node:internal/modules/esm/module_job:185:25)\r\nPS C:\\ArunSk\\aswin>\r\nif I comment that package and try to build it's building fine and I have added config.ts also\r\n\r\nimport { UserConfig } from 'vite';\r\n\r\nconst config: UserConfig = {\r\n// Other Vite configuration options...\r\nbuild: {\r\nrollupOptions: {\r\nexternal: /^bootstrap($|/)/,\r\n},\r\nssr: false,\r\n},\r\n};\r\n\r\nexport default config;\r\n\r\nmy package.json\r\n\r\n{\r\n\"scripts\": {\r\n\"docs:dev\": \"vitepress dev docs\",\r\n\"docs:build\": \"vitepress build docs\",\r\n\"docs:preview\": \"vitepress preview docs\"\r\n},\r\n\"peerDependencies\": {\r\n\"markdown-it-container\": \"^3.0.0\",\r\n\"vitepress\": \"\",\r\n\"vue\": \"^3.2.0\"\r\n},\r\n\"devDependencies\": {\r\n\"@types/markdown-it\": \"^12.2.3\",\r\n\"@types/markdown-it-container\": \"^2.0.5\",\r\n\"@types/node\": \"^18.16.3\",\r\n\"lint-staged\": \"^13.2.2\",\r\n\"vue\": \"^3.2.38\"\r\n},\r\n\"dependencies\": {\r\n\"bootstrap\": \"^5.2.0\",\r\n\"fire-stars\": \"^0.0.1\",\r\n\"markdown-it\": \"^13.0.1\",\r\n\"markdown-it-container\": \"^3.0.0\",\r\n\"sass\": \"^1.63.6\",\r\n\"vitepress\": \"\",\r\n\"vue\": \"^3.2.0\"\r\n}\r\n}\n\n### Reproduction\n\nSo is it possible to sort out that issue with vite config ts \r\n\r\n// vite.config.ts\r\nimport { defineConfig } from 'vite';\r\nimport { UserConfig } from 'vite';\r\n\r\nconst config: UserConfig = {\r\nbuild: {\r\nrollupOptions: {\r\nexternal: ['fire-stars'], // Add external module\r\noutput: {\r\nglobals: {\r\n'fire-stars': 'fireStars', // Provide global variable name for the external module\r\n},\r\n},\r\n},\r\n},\r\n};\r\n\r\nexport default defineConfig(config);\r\n\r\nso is it posiible with vite config ts file ?\n\n### Expected behavior\n\nBuild susseful \r\n\r\nAnd this is my old question same issue But now I want in diff approch\r\n\r\nhttps://github.com/vuejs/vitepress/issues/2633\n\n### System Info\n\n```sh\n{\r\n \"devDependencies\": {\r\n \"vitepress\": \"^1.0.0-beta.5\"\r\n },\r\n \"scripts\": {\r\n \"docs:dev\": \"vitepress dev vitepress\",\r\n \"docs:build\": \"vitepress build vitepress\",\r\n \"docs:preview\": \"vitepress preview vitepress\"\r\n },\r\n \"dependencies\": {\r\n \"fire-stars\": \"^0.0.1\",\r\n \"sass\": \"^1.63.6\"\r\n }\r\n}\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.",[2931],{"name":2932,"color":2933},"bug: pending triage","e99695",2653,"Build issue ","2023-07-28T00:04:08Z","https://github.com/vuejs/vitepress/issues/2653",0.76587594,{"description":2940,"labels":2941,"number":2942,"owner":2872,"repository":2873,"state":2907,"title":2943,"updated_at":2944,"url":2945,"score":2946},"**Describe the bug**\r\nSpin up vitepress locally to develop\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\nFollow contributing instructions\r\n1. Clone vitepress\r\n2. yarn && yarn link\r\n3. yarn dev\r\n\r\ngo to new directory and try and link vitepress:\r\n\r\n```console\r\n▶ yarn link vitepress\r\nyarn link v1.22.4\r\nwarning package.json: No license field\r\nsuccess Using linked package for \"vitepress\".\r\n✨ Done in 0.06s.\r\n\r\nsource/repos/kpress master ✗ 6h15m ✖ ⚑ ◒\r\n▶ yarn dev\r\nyarn run v1.22.4\r\nwarning package.json: No license field\r\n$ vitepress dev docs\r\nvitepress v0.5.0\r\nvite v1.0.0-rc.3\r\n/Users/darrenjennings/source/repos/vitepress/dist/shared/config.js:23\r\nexport function resolveSiteDataByRoute(siteData, route) {\r\n^^^^^^\r\n\r\nSyntaxError: Unexpected token export\r\n at Module._compile (internal/modules/cjs/loader.js:760:23)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)\r\n at Module.load (internal/modules/cjs/loader.js:685:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:620:12)\r\n at Module.require (internal/modules/cjs/loader.js:723:19)\r\n at require (internal/modules/cjs/helpers.js:14:16)\r\n at Object.\u003Canonymous> (/Users/darrenjennings/source/repos/vitepress/dist/node/config.js:11:16)\r\n at Module._compile (internal/modules/cjs/loader.js:816:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)\r\n at Module.load (internal/modules/cjs/loader.js:685:32)\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\n**Expected behavior**\r\nShould not throw error.\r\n\r\n**System Info**\r\n- vitepress version: v0.5.0\r\n- vite version: v1.0.0-rc.3\r\n- Node version: 12.13.0\r\n- OS version: Mac OS 10.15.3\r\n\r\n**Additional context**\r\n\r\n",[],72,"contributing error with cjs export","2023-01-21T16:24:19Z","https://github.com/vuejs/vitepress/issues/72",0.76861465,{"description":2948,"labels":2949,"number":2951,"owner":2872,"repository":2873,"state":2907,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Describe the bug\n\n在开发环境下,进行了如下设置:\r\n```\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n themeConfig: {\r\n search: {\r\n provider: 'local',\r\n options: {\r\n locales: {\r\n zh: {\r\n translations: {\r\n button: {\r\n buttonText: '搜索文档',\r\n buttonAriaLabel: '搜索文档'\r\n },\r\n modal: {\r\n noResultsText: '无法找到相关结果',\r\n resetButtonTitle: '清除查询条件',\r\n footer: {\r\n selectText: '选择',\r\n navigateText: '切换'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n})\r\n```\r\n运行后搜索界面语言并未变化,仍然为英语\n\n### Reproduction\n\n..\n\n### Expected behavior\n\n...\n\n### System Info\n\n```shell\n...\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.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2950],{"name":2932,"color":2933},2243,"本地搜索的i18n设置中文后","2023-04-28T00:04:22Z","https://github.com/vuejs/vitepress/issues/2243",0.7692378,{"description":2957,"labels":2958,"number":2960,"owner":2872,"repository":2873,"state":2907,"title":2961,"updated_at":2962,"url":2963,"score":2964},"### Describe the bug\n\nA scrollbar appears in the sidebar when it isn't required:\r\n\u003Cimg width=\"1727\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/583075/777b43ef-7bf4-4794-9b6a-2e598411b386\">\r\n\r\nI saw the same in https://vitepress.dev\n\n### Reproduction\n\nRun the vitepress dev docs.\n\n### Expected behavior\n\nThe sidebar shouldn't be there until there are enough items in the sidebar.\n\n### System Info\n\n```Text\nn/a\n```\n\n\n### Additional context\n\nThere is a `padding-bottom: 128px` [here](https://github.com/vuejs/vitepress/blob/85bd7e845ab37862d68d2506f0b693dafc236a7a/src/client/theme-default/components/VPSidebar.vue#L92) that may be part of the issue. It seems the height of the sidebar should also be reviewed.\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.",[2959],{"name":2866,"color":2867},3228,"Unneeded scrollbar in sidebar","2023-11-30T00:04:40Z","https://github.com/vuejs/vitepress/issues/3228",0.7742462,["Reactive",2966],{},["Set"],["ShallowReactive",2969],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fVjGMYVCiqXMMLkW37XcOKT2AGselCCyjgOKHUYEOMs8":-1},"/vuejs/vitepress/1996"]