vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Redirect homepage route

Open dj835638078 opened this issue 1 year ago • 3 comments

Describe the bug

when i set srcDir: '../' in config.ts,All routes become '/docs/', but When I start the project,The link that opens is '/', it is 404, The routing in the upper left corner of the page is also / how can i Revise the Default homepage route '/' to '/docs' 404 OK

Reproduction

in describe

Expected behavior

/ to /docs

System Info

windows

Additional context

No response

Validations

dj835638078 avatar Feb 07 '24 07:02 dj835638078

You can set logoLink: '/docs/ in themeConfig. It won't redirect your page to /docs/ by default though. Why do you need to set srcDir?

brc-dd avatar Feb 07 '24 07:02 brc-dd

You can set logoLink: '/docs/ in themeConfig. It won't redirect your page to /docs/ by default though. Why do you need to set srcDir?

I want to put the md file of the document in the directory of the component

dj835638078 avatar Feb 07 '24 09:02 dj835638078

Are those components also being served under /docs/? Can you show your directory tree and at which route you want to serve which file?

brc-dd avatar Feb 09 '24 13:02 brc-dd

Closing as stale/

brc-dd avatar Apr 12 '24 06:04 brc-dd