` to be served at `/blog/` and `\u003CArticle />` to be served at inner routes\r\n3. Use custom layout component in `.vitepress/theme/index.js`\r\n```js\r\nexport default {\r\n ...DefaultTheme,\r\n Layout,\r\n};\r\n```\r\n3. Define routing logic in `Layout.vue` component\r\n```js\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003CBlog v-if=\"isIndex\" />\r\n \u003CArticle v-else />\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport { useRoute } from 'vitepress';\r\nimport Blog from './Blog.vue';\r\nimport Article from './Article.vue';\r\n\r\nconst route = useRoute();\r\nconst isIndex = computed(() => {\r\n return route.path.replace(/index.html$/, '') === '/';\r\n});\r\n\u003C/script>\r\n\r\n```\r\n\r\n### Expected behavior\r\n\r\nI expect that\r\n1. Blog component is served at `/blog/`\r\n2. Article component is served at `/blog/**/*` routes\r\n3. No `Hydration completed but contains mismatches.` error in the console\r\n4. No blinking screen that happens because the page is rendered as Article in SSR and then transformed into Blog during hydration\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 11.6\r\n CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz\r\n Memory: 176.77 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 16.1.0 - ~/.nvm/versions/node/v16.1.0/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 7.17.0 - ~/.nvm/versions/node/v16.1.0/bin/npm\r\n Browsers:\r\n Brave Browser: 92.1.28.106\r\n Chrome: 96.0.4664.45\r\n Firefox: 90.0.2\r\n Safari: 15.0\r\n npmPackages:\r\n vitepress: ^0.20.1 => 0.20.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.",[],446,"route.path doesn't work correctly with base option","2023-01-21T14:35:45Z","https://github.com/vuejs/vitepress/issues/446",0.68960506,{"description":2929,"labels":2930,"number":2932,"owner":2871,"repository":2872,"state":2885,"title":2933,"updated_at":2934,"url":2935,"score":2936},"### Describe the bug\n\nVite supports defining a relative `base` (`./`) to use when deploying to unknown subpaths.\r\n\r\nVitepress breaks this behavior and instead renders a 404 (hydration mismatch) error.\n\n### Reproduction\n\nuse the default theme installation with the additional vite `base` config:\r\n\r\n```ts\r\nimport { defineConfig } from 'vitepress'\r\n\r\n// https://vitepress.dev/reference/site-config\r\nexport default defineConfig({\r\n title: \"My Awesome Project\",\r\n description: \"A VitePress Site\",\r\n // ...\r\n vite: {\r\n base: './', // \u003C-- this breaks the site generation (homepage shows 404 & hydration mismatch)\r\n },\r\n})\r\n```\n\n### Expected behavior\n\nIt should work just like vite works.\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.3.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 450 MB / 64.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node\r\n npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm\r\n Browsers:\r\n Chrome: 121.0.6167.160\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.42 => 1.0.0-rc.42\n```\n\n\n### Additional context\n\nNot sure if #3057 describes the same issue but it seems related.\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":2882,"color":2883},3576,"Relative base breaks site generation","2024-02-23T00:05:14Z","https://github.com/vuejs/vitepress/issues/3576",0.6926099,{"description":2938,"labels":2939,"number":2940,"owner":2871,"repository":2872,"state":2885,"title":2941,"updated_at":2942,"url":2943,"score":2944},"I want to make a post list with excerption, now I am using `createContentLoader` , and it can get rendered html excerpt, but the image url not append the right prefix. \r\n```ts\r\nexport default createContentLoader(POST_FILES, {\r\n\texcerpt: (file) => {\r\n\t\tconst index = file.content.indexOf(EXCERPT_MARK)\r\n\r\n\t\tfile.excerpt = file.content.substring(\r\n\t\t\t0,\r\n\t\t\tindex == -1 ? EXCERPT_LENGTH : index\r\n\t\t)\r\n\t},\r\n\ttransform(raw): Post[] {\r\n\t\treturn raw\r\n\t\t\t.map(({ url, frontmatter, excerpt }) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttitle: frontmatter.title,\r\n\t\t\t\t\tcategories: frontmatter?.categories ?? [],\r\n\t\t\t\t\tdescription: excerpt,\r\n\t\t\t\t\ttags: frontmatter.tags ?? [],\r\n\t\t\t\t\turl: url,\r\n\t\t\t\t\texcerpt,\r\n\t\t\t\t\tdate: formatDate(frontmatter.date),\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.sort((a, b) => b.date.time - a.date.time)\r\n\t},\r\n})\r\n```\r\nfor example, i use relative path syntax inside markdown file:\r\n```\r\n\r\n```\r\nit show up in excerption was: \r\n```\r\n\u003Cimg src=\"./images/xxx.png\" />\r\n```\r\nand in post or page that process by vitepress is correct url:\r\n```\r\n\u003Cimg src=\"/blog/xxxx/images/xxx.png\" />\r\n```\r\nhow can I make the right process by ourself ?",[],3072,"[Query] How image url inside markdown transform to right url ?","2023-10-21T00:05:52Z","https://github.com/vuejs/vitepress/issues/3072",0.6946135,{"description":2946,"labels":2947,"number":2951,"owner":2871,"repository":2872,"state":2885,"title":2952,"updated_at":2953,"url":2954,"score":2955},"**Describe the bug**\r\n\r\nSee https://github.com/songololo/vitepress-debug for reproduction of this issue:\r\n\r\nRun a dev server: `yarn docs:dev`.\r\n\r\nNote that the base-path `/my-base-path/` is set in the config at `.vitepress/config.js`.\r\n\r\nThe base path works for root files, i.e. `index.md` is served from `/my-base-path/`.\r\n\r\nHowever, the base path is missing for nested files, i.e. `content/index.md` is served from `/content/` and `content/hello.md` is served from `/content/hello.html`.\r\n\r\nThis doesn't break things in development mode because the links are also missing the base path.\r\n\r\nHowever, it breaks things in production because the links are missing the base path.\r\n\r\n**System Info**\r\n- vitepress 0.12.2\r\n- vite/2.0.4\r\n- darwin-x64\r\n- node-v15.8.0\r\n\r\nThis happens for both my local system and for a github actions build.",[2948],{"name":2949,"color":2950},"bug: pending triage","e99695",252,"Base paths (and links) not generating correctly for nested pages.","2023-01-21T16:20:10Z","https://github.com/vuejs/vitepress/issues/252",0.6959064,{"description":2957,"labels":2958,"number":2959,"owner":2871,"repository":2872,"state":2885,"title":2960,"updated_at":2961,"url":2962,"score":2963},"\u003C!--\r\nNOTE:\r\nVitePress is still WIP, and it is not compatible with VuePress.\r\nPlease do not open issue about default theme missing features or something doesn't work like VuePress.\r\n-->\r\n\r\n**Describe the bug**\r\n`yarn docs:dev` renders home page on `http://localhost:3000` despite *base* is defined in *config.js*. But asset links honor the base path.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. follow *getting started* to create new site\r\n2. create file */docs/.vitepress/config.js* with base set to, say `/foo/`\r\n3. run `yarn docs:dev`\r\n\r\n**Expected behavior**\r\nSite should be rendered at `http://localhost:3000/foo/`\r\n\r\n**System Info**\r\n- vitepress version: 0.9.1\r\n- vite version: 1.0.0-rc.13\r\n- Node version: v14.5.0\r\n- OS version: Windows 10\r\n\r\n",[],181,"dev home page doesn't honor base config","2023-01-21T16:23:59Z","https://github.com/vuejs/vitepress/issues/181",0.69845283,["Reactive",2965],{},["Set"],["ShallowReactive",2968],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fnfPLQtVa-H3VODU9_eoReCdMxaTTDln499S_NcJLUL0":-1},"/vuejs/vitepress/3063"]