New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(prerender): remove baseURL
from generated file paths
#329
Conversation
Maybe I'm wrong about the behavior of Nuxt pretender. Should it generate a subdirectory inside What I think is that the generated website should not have a subdirectory inside it. When I set Feel free to close this PR if it does not look good :) |
Are you sure the previous PR doesn't resolve this issue? That was initially what I did @farnabaz - check the PR. But we adjusted it to remove the baseURL before the actual fetch call. |
Ah. I think what we actually need to do here is remove the baseURL from the |
Yes removing baseURL from But I think the best way is to remove baseURL from routes and add it in the fetch call. This way we can support URLs like this
Imagine user has a page with the same name as baseURL |
I think that's a good point. But we will still need to update the filenames |
Codecov Report
@@ Coverage Diff @@
## main #329 +/- ##
==========================================
+ Coverage 55.94% 55.95% +0.01%
==========================================
Files 54 54
Lines 3466 3467 +1
Branches 362 362
==========================================
+ Hits 1939 1940 +1
Misses 1178 1178
Partials 349 349
Continue to review full report at Codecov.
|
baseURL
from extracted linksbaseURL
from generated file paths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We might add a symbolic link to avoid breaking change and allow cases when public structure is expected to have base url
Co-authored-by: Daniel Roe <daniel@roe.dev>
π Linked issue
β Type of change
π Description
Generating a project using custom baseURL results unwanted directory inside
.output/public
.For example, if you set
baseURL = romi-project
, you will see aromi-project
directory in the generated website. https://github.com/hacknug/romi-project/tree/gh-pagesπ Checklist