\r\n\u003Cscript setup>\r\nimport Test from './Test.vue';\r\n\u003C/script>\r\n```\r\n\n\n### Reproduction\n\ngo to chrome developer tool and console tab to view error details\n\n### Expected behavior\n\nI should able read the custom variable chapter & topic variable \n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)\r\n CPU: (4) x64 Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz\r\n Memory: 558.27 MB / 5.71 GB\r\n Container: Yes\r\n Shell: 5.8 - /usr/bin/zsh\r\n Binaries:\r\n Node: 14.19.0 - /usr/bin/node\r\n Yarn: 1.22.17 - /usr/local/bin/yarn\r\n npm: 7.17.0 - /usr/local/bin/npm\r\n Browsers:\r\n Brave Browser: 98.1.35.101\r\n Firefox: 97.0.1\r\n \"devDependencies\": {\r\n \"postcss\": \"^8.4.6\",\r\n \"sass\": \"^1.49.8\",\r\n \"stylus\": \"^0.56.0\",\r\n \"vitepress\": \"^0.22.2\",\r\n \"tailwindcss\": \"^3.0.23\"\r\n },\r\n \"dependencies\": {\r\n \"autoprefixer\": \"^10.4.2\"\r\n },\r\n \"postcss\": {\r\n \"plugins\": {\r\n \"tailwindcss\": {},\r\n \"autoprefixer\": {}\r\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.vuejs.org).\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},"bug: pending triage","e99695",550,"How to read sitedata and pagedata inside vue component with default theme","2023-01-21T16:20:05Z","https://github.com/vuejs/vitepress/issues/550",0.71841747,{"description":2890,"labels":2891,"number":2892,"owner":2871,"repository":2872,"state":2873,"title":2893,"updated_at":2894,"url":2895,"score":2896},"### Is your feature request related to a problem? Please describe.\n\nCurrently, Vitepress provides functions like `usePage` or `frontmatter` to retrieve frontmatter data of the rendered page. However, there is no built-in functionality to retrieve frontmatter data of multiple Markdown files within a directory.\r\n\r\nImagine I'm crafting a custom layout, possibly for a portfolio or blog page. Within my project directory, I have folders like `project/blog/` or `project/portfolio` alongside the main `index.md`. Inside these directories lie numerous Markdown files, each containing frontmatter data similar to this:\r\n\r\n```md\r\n---\r\ntitle: Blog Post Title\r\ndate: 2024-03-27\r\nauthor: John Doe\r\ntags: [blog, update]\r\nlayout: blog\r\n---\r\n\r\n# Blog Post Title\r\n\r\nThis is the content of your blog post, written in Markdown format.\r\n\r\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget turpis nec leo euismod fringilla vitae ut quam.\r\n```\r\n\r\nHowever, my challenge arises when attempting to access the frontmatter data of all these files. While Vitepress offers functions like usePage or frontmatter to retrieve individual page data, there isn't an equivalent function like usePages to access data from multiple files simultaneously.\n\n### Describe the solution you'd like\n\nI would like to propose the addition of a new function or hook, such as `usePages`, that allows developers to retrieve frontmatter data of all Markdown files within a specified directory. This would provide more flexibility and enable the creation of custom layouts for portfolio or blog-related pages.\n\n### Describe alternatives you've considered\n\nAs an alternative, developers currently have to manually parse Markdown files using Node.js scripts before building the Vitepress project. However, this approach is less convenient and may not integrate seamlessly with the Vitepress development workflow.\n\n### Additional context\n\nBy adding support for retrieving frontmatter data of multiple Markdown files, developers can streamline the development process and create more dynamic and customizable layouts for their Vitepress projects. This feature would enhance the flexibility and usability of Vitepress, making it even more appealing for building static websites and blogs.\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.",[],3710,"Feature Request: Add Support for Retrieving Frontmatter Data from Multiple Markdown Files","2024-04-28T12:25:23Z","https://github.com/vuejs/vitepress/issues/3710",0.72891164,{"description":2898,"labels":2899,"number":2903,"owner":2871,"repository":2872,"state":2873,"title":2904,"updated_at":2905,"url":2906,"score":2907},"### Describe the bug\n\nI referenced a globally registered component in the markdown document of vitepress. When I used it, the error was reported as follows:\r\n**[vitepress] Internal server error: At least one \u003Ctemplate> or \u003Cscript> is required in a single file component.**\r\n\r\n\r\n\n\n### Reproduction\n\nCreate vite.config.js in the vitepress root directory, the content is as follows:\r\n\r\n```\r\nimport { defineConfig } from \"vite\";\r\nimport vueJsx from \"@vitejs/plugin-vue-jsx\";\r\nimport vue from \"@vitejs/plugin-vue\"\r\nexport default defineConfig({\r\n plugins: [\r\n vue(),\r\n vueJsx(),\r\n ],\r\n});\r\n```\n\n### Expected behavior\n\nRender component content correctly\n\n### System Info\n\n```shell\nnode 16\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.",[2900],{"name":2901,"color":2902},"need more info","bdbefc",2095,"vitepress not support jsx file?","2023-03-29T00:04:14Z","https://github.com/vuejs/vitepress/issues/2095",0.73002416,{"description":2909,"labels":2910,"number":2911,"owner":2871,"repository":2872,"state":2873,"title":2912,"updated_at":2913,"url":2914,"score":2915},"how can i update the css properties of this file ? bcoz every styles are scoped node_modules/vitepress/dist/client/theme-default/components/Page.vue",[],620," there is no documentation for update default components ","2023-01-21T16:04:20Z","https://github.com/vuejs/vitepress/issues/620",0.7318438,{"description":2917,"labels":2918,"number":2922,"owner":2871,"repository":2872,"state":2873,"title":2923,"updated_at":2924,"url":2925,"score":2926},"### Describe the bug\n\n\r\n\r\nI use the config file out of .vitepress, I just import it in `.vitepress/config.ts`\r\n\r\nwhen I modify `.vitepress/config.ts`, hot reload works well, but I modify the outer config.ts, hot reloading does not work.\r\n\n\n### Reproduction\n\nJust modify the outer config.ts, the page does not get update.\n\n### Expected behavior\n\nI think vitepress should track the import modules graph in .vitepress/config.ts, and hot reload all of them.\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 12.0.1\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 668.14 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.1 - ~/.volta/tools/image/node/16.14.1/bin/node\r\n Yarn: 1.22.15 - ~/.yarn/bin/yarn\r\n npm: 7.10.0 - ~/.volta/tools/image/npm/7.10.0/bin/npm\r\n Browsers:\r\n Chrome: 99.0.4844.74\r\n Edge: 98.0.1108.55\r\n Firefox: 95.0.2\r\n Safari: 15.1\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.",[2919],{"name":2920,"color":2921},"build","377ba8",581,"When modifying config.ts imported outside of .vitepress folder, it is not hot reload","2023-01-21T14:28:57Z","https://github.com/vuejs/vitepress/issues/581",0.73575306,{"description":2928,"labels":2929,"number":2930,"owner":2871,"repository":2872,"state":2873,"title":2931,"updated_at":2932,"url":2933,"score":2934},"### Describe the bug\r\n\r\nAfter upgrading the vitepress version to `0.17.0`, The following error is prompted:\r\n**TypeError: Cannot destructure property 'locales' of 'siteData.themeConfig' as it is undefined**\r\n\r\n### Reproduction\r\n\r\n1. Change the version of `vitepress` in the `package.json` file from \"^0.16.1\" to \"^0.17.0\",\r\n2. run `yarn install`\r\n3. then run `yarn run docs:dev`\r\n4. which prompts the following error:\r\n```bash\r\nDebugger attached.\r\nyarn run v1.22.11\r\n$ vitepress dev docs\r\nDebugger attached.\r\nvitepress v0.17.0\r\nvite v2.5.2\r\nfailed to start server. error:\r\n TypeError: Cannot destructure property 'locales' of 'siteData.themeConfig' as it is undefined.\r\n at Object.createLangDictionary (C:\\Users\\yangquan6\\Documents\\yangquan666.github.io\\node_modules\\vitepress\\dist\\node\\shared.js:27:13)\r\n at resolveSiteData (C:\\Users\\yangquan6\\Documents\\yangquan666.github.io\\node_modules\\vitepress\\dist\\node\\config.js:80:25)\r\n at Object.resolveConfig (C:\\Users\\yangquan6\\Documents\\yangquan666.github.io\\node_modules\\vitepress\\dist\\node\\config.js:25:24)\r\n at async Object.createServer (C:\\Users\\yangquan6\\Documents\\yangquan666.github.io\\node_modules\\vitepress\\dist\\node\\server.js:8:20)\r\nWaiting for the debugger to disconnect...\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\nWaiting for the debugger to disconnect...\r\n```\r\n\r\n### Expected behavior\r\n\r\nThe project starts normally and does not report errors\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Windows 10 10.0.19042\r\n CPU: (6) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz\r\n Memory: 8.29 GB / 15.87 GB\r\n Binaries:\r\n Node: 14.17.6 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.11 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 6.14.15 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.84)\r\n Internet Explorer: 11.0.19041.1\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] Follow our [Code of Conduct](https://vuejs.org/coc)\r\n- [X] Read the [docs](https://vitepress.vuejs.org/).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],379," Cannot destructure property 'locales' of 'siteData.themeConfig' as it is undefined.","2023-01-21T16:22:07Z","https://github.com/vuejs/vitepress/issues/379",0.7359626,{"description":2936,"labels":2937,"number":2939,"owner":2871,"repository":2872,"state":2873,"title":2940,"updated_at":2941,"url":2942,"score":2943},"### Describe the bug\n\nI've built a fairly comprehensive blog theme for my use. \r\n\r\nhttps://github.com/jcamp-code/vitepress-blog-theme\r\nhttps://vitepress-blog.netlify.app/blog/\r\n\r\nIt extends the default theme by using the slots and built in features of VitePress. As you can see from the demo, it works just fine. I was hoping to package it up and be able to use it across a few sites so that I could make updates in one place and just update the package of my sites.\r\n\r\nHowever, when I try that, the new site throws \r\n\r\n```\r\nUnknown file extension \".css\"\r\nUnknown file extension \".vue\"\r\n```\r\n\r\nIt's not processing these files from the package correctly\n\n### Reproduction\n\nhttps://github.com/jcamp-code/starter-vitepress-blog\n\n### Expected behavior\n\nWould like VitePress to properly pull in Vue and CSS files from packages\n\n### System Info\n\n```shell\nNA\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.",[2938],{"name":2920,"color":2921},2242,"data loader files from package not working in dev","2023-05-02T00:04:02Z","https://github.com/vuejs/vitepress/issues/2242",0.73646086,{"description":2945,"labels":2946,"number":2948,"owner":2871,"repository":2872,"state":2873,"title":2949,"updated_at":2950,"url":2951,"score":2952},"### Describe the bug\r\n\r\nwhen I update the version to `\"vitepress\": \"^1.0.0-alpha.63\",` , and run `vitepress dev docs`, The Aside component is render nothing\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nupdate the vitepress version to `\"vitepress\": \"^1.0.0-alpha.63\",`\r\n\r\nrun `vitepress dev docs`\r\n\r\n`config.js`\r\n```\r\nimport { defineConfigWithTheme } from 'vitepress';\r\nimport vueJsx from '@vitejs/plugin-vue-jsx';\r\nimport baseConfig from '@vue/theme/config';\r\nimport { demoBlockPlugin } from 'vitepress-theme-demoblock';\r\nimport path from 'path';\r\n\r\nimport { i18n, nav, sidebar } from './themeConfig/index';\r\n\r\nexport default defineConfigWithTheme({\r\n extends: baseConfig,\r\n lang: 'zh-CN',\r\n title: 'SinoGear Vue',\r\n description: '',\r\n srcDir: './src',\r\n scrollOffset: 'header',\r\n ignoreDeadLinks: true,\r\n head: [['meta', { name: 'theme-color', content: '#3c8772' }]],\r\n themeConfig: {\r\n nav,\r\n sidebar,\r\n appearance: false, // 开启 light/dark 模式\r\n // Placeholder of the i18n config for @vuejs-translations.\r\n i18n,\r\n },\r\n\r\n markdown: {\r\n config(md) {\r\n md.use(demoBlockPlugin, {\r\n cssPreprocessor: 'less',\r\n scriptImports: [\r\n \"import * as AntDesignVue from 'ant-design-vue'\",\r\n ],\r\n scriptReplaces: [\r\n {\r\n searchValue: /import ({.*}) from 'ant-design-vue'/g,\r\n replaceValue: (s, s1) => `const ${s1} = AntDesignVue`\r\n },\r\n ]\r\n });\r\n }\r\n },\r\n\r\n vite: {\r\n server: {\r\n host: true,\r\n port: 3001,\r\n fs: {\r\n // for when developing with locally linked theme\r\n allow: ['../..']\r\n }\r\n },\r\n build: {\r\n chunkSizeWarningLimit: Infinity\r\n },\r\n json: {\r\n stringify: true\r\n },\r\n ssr: {\r\n noExternal: ['@wangeditor/editor', '@wangeditor/editor-for-vue', 'ant-design-vue', '@ant-design/icons-vue', '@babel/runtime']\r\n },\r\n plugins: [vueJsx()],\r\n css: {\r\n preprocessorOptions: {\r\n less: {\r\n javascriptEnabled: true\r\n }\r\n }\r\n }\r\n },\r\n\r\n vue: {\r\n reactivityTransform: path.resolve(__dirname, 'src')\r\n }\r\n});\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\nrender aside component\r\n\r\n### System Info\r\n\r\n\r\n`packages.json`\r\n```shell\r\n\r\n\"@babel/plugin-syntax-jsx\": \"^7.18.6\",\r\n \"@vitejs/plugin-vue\": \"^4.0.0\",\r\n \"@vitejs/plugin-vue-jsx\": \"^3.0.0\",\r\n \"@vue/babel-plugin-jsx\": \"^1.1.1\",\r\n \"@vue/compiler-sfc\": \"^3.0.4\",\r\n \"conventional-changelog-cli\": \"^2.1.0\",\r\n \"cross-env\": \"^7.0.2\",\r\n \"del\": \"^6.0.0\",\r\n \"gulp\": \"^4.0.2\",\r\n \"gulp-babel\": \"^8.0.0\",\r\n \"highlight.js\": \"^10.4.1\",\r\n \"less\": \"^4.1.2\",\r\n \"lint-staged\": \"^13.0.3\",\r\n \"prettier\": \"^2.7.1\",\r\n \"rimraf\": \"^3.0.0\",\r\n \"transliteration\": \"^2.2.0\",\r\n \"vitepress\": \"^1.0.0-alpha.63\",\r\n \"vitepress-plugin-search\": \"^1.0.4-alpha.17\",\r\n \"vitepress-theme-demoblock\": \"^2.0.0\"\r\n```\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] 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.",[2947],{"name":2901,"color":2902},2157,"The Aside component is render nothing","2023-04-05T00:04:02Z","https://github.com/vuejs/vitepress/issues/2157",0.73707736,{"description":2954,"labels":2955,"number":2956,"owner":2871,"repository":2872,"state":2873,"title":2957,"updated_at":2958,"url":2959,"score":2960},"### Is your feature request related to a problem? Please describe.\r\n\r\nCurrently, I have three small blogs due to different approaches. I have customized certain things in the theme design when downloading VitePress, for example, to include in these projects native web components that can be loaded as an html tag from a simple Markdown (.md) file, besides include TailwindCSS.\r\nI am not interested in doing a Fork and would like to evaluate if it is possible to change the directory of the Vitepress documents (separating or decoupling the content of the mechanism) in order to have versatility and not having to copy in each project folder the theme and components (I mean, an `srcDir` different from `root`).\r\n\r\n### Describe the solution you'd like\r\n\r\nOne idea would be to allow the base directory of Vitepress to be different from the root, separating or decoupling the content of the theme or template (although I would understand if it is a matter of design).\r\nWhat is wanted is to use the modified Vitepress theme on different blogs without having to copy it to each project (thinking in multi-project of content)\r\n\r\n### Describe alternatives you've considered\r\n\r\n1. I have tried to apply on each of the three Vitepress blogs with the custom theme ( just that it can lead to theme desynchronization).\r\n\r\n2. Another way is to have every blog under root folder and change `srcDir` in `config.mjs` according the blog selected.\r\n\r\n3. Using a symbolic link but eventualy some errors occurs cause it resolves another path (e.g. `../../path`) and finally doesn't work.\r\n\r\n### Additional context\r\n\r\nThe project with native web components that can be use in Markdown (.md) is: \u003Chttps://github.com/kaesar/onmind-cui>\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.",[],4384,"A way to configure the directory for docs instead of the root folder","2024-12-29T04:43:47Z","https://github.com/vuejs/vitepress/issues/4384",0.73857194,["Reactive",2962],{},["Set"],["ShallowReactive",2965],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fuUeBlWtxiIDUDQXsUEWUulIssOAHz34lmG7zYoQMhaE":-1},"/vuejs/vitepress/208"]