You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a site in a custom folder and noticed several issues.
My site is located in the folder sites/mysite.com.
When I run following command in the root of my project:
npx vitepress build sites/mysite.com --outDir public
Instead of writing to ${workplaceFolder}/public it actually still resolves outDir relatively to sites/mySite.com so to make it working I need to use currently ../../public or $(pwd)/public which are both too confusing because from CLI call it looks like i write to something above.
My suggestion is that relative path needs to be resolved relatively to cwd, not a docs folder.
But even like that what I find even more strange - this setting only impacts assets, while actual html pages are still located in the .vitepress/dist folder. Do you know how to fix that too? THanks!
Reproduction
Just create a nested project like sites/test.site and try to build it to a public/test.site folder in your root.
Expected behavior
command like vitepress build path/to/my/site --outDir public resolves to a public folder in your root - not in the package.
html pages should be also built respectively to outDir parameter
Ah, the support was added in 22047f3 . The second one is a bug then. Everything should be generated inside outDir. Regarding resolution from cwd vs project root, it's consistent across all the config: https://vitepress.dev/reference/site-config#outdir
Describe the bug
I'm trying to build a site in a custom folder and noticed several issues.
My site is located in the folder
sites/mysite.com
.When I run following command in the root of my project:
Instead of writing to ${workplaceFolder}/public it actually still resolves outDir relatively to sites/mySite.com so to make it working I need to use currently
../../public
or$(pwd)/public
which are both too confusing because from CLI call it looks like i write to something above.My suggestion is that relative path needs to be resolved relatively to cwd, not a docs folder.
But even like that what I find even more strange - this setting only impacts assets, while actual html pages are still located in the .vitepress/dist folder. Do you know how to fix that too? THanks!
Reproduction
Just create a nested project like sites/test.site and try to build it to a public/test.site folder in your root.
Expected behavior
vitepress build path/to/my/site --outDir public
resolves to a public folder in your root - not in the package.System Info
System: OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye) CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U Memory: 11.75 GB / 15.34 GB Container: Yes Shell: 5.1.4 - /bin/bash Binaries: Node: 20.3.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.6.7 - /usr/local/bin/npm pnpm: 8.6.6 - /usr/local/share/npm-global/bin/pnpm npmPackages: vitepress: ^1.0.0-beta.6 => 1.0.0-beta.6
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: