-
Notifications
You must be signed in to change notification settings - Fork 17
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
Vercel has a cleanUrls
option
#1
Comments
Thanks, will add a line for this option (and also I understand that Particularly, next export will create files such as |
Thank you! We will soon be changing the default on Vercel to have cleanUrls enabled by default. Stay tuned for that changelog. Re: |
Yes that's what I thought 😆 using next export on Vercel is probably not the most used setup |
@leerob is there a way to configure cleanUrl + trailingSlash using the Vercel interface? What's the simplest way for me to deploy the static folder with 4 distinct options combinations? Is there any way to avoid having 4 distinct folders? |
Currently, those options are only available through You can simply create multiple projects with different |
@leerob but doesn't this mean that I have to create/maintain multiple copies of my static folder in this repo then? |
No, you can import the same repository multiple times. One to many relationship with projects. So you can have the same code but different settings per project! |
Yes I understand that, but how can I have different Vercel settings for the same github repo? I'd have to use 4 vercel.json config in any case, and it's only possible to put one in I'm thinking of using different branches for each vercel deployment, any better idea? |
Ahh, my bad. Sorry, I wasn't putting the full picture together here. Yes, since you need to have multiple P.S. |
Oh noooow :'( I just created the 6 branch to account for all the combinations of Is there anything you can do to unlock this? I'd prefer not having to maintain multiple forks or pay a pro plan just for this repo 🤪
From what I see, it's fine to nest the config file in Also, noticed that the |
Happy to sponsor a Pro team (which has 10) for this 😄
|
thanks :) Here's the slug: https://vercel.com/teams/trailing-slash-team/ |
Done! |
Thanks
Will try to finish all this tomorrow 😜
Le mar. 6 juil. 2021 à 20:31, Lee Robinson ***@***.***> a
écrit :
… Done!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFW6PVL67SPXYYAOBG6FYLTWNDZXANCNFSM46UGJ2MQ>
.
|
Thanks, it seems to be working. Now covering all the options (I think) Seems like Vercel has some unexpected serving behaviors. Using cleanUrls is not enough to get file.html served and you have to use the trailingSlash option too? https://github.com/slorber/trailing-slash-guide FYI I wasn't able to transfer the projects (asking for CB) so I recreated them: |
@slorber Guessing you hit the issue since I added a sponsorship to your account, and never put in card information 😄 Edge case! |
That sounds unexpected, I will report back to the team! |
Edit: nevermind it looks like it behaves with Maybe we should update this doc, does it require to redeploy things?
@leerob was wondering if It seems a Docusaurus user may be affected by the current serving behavior: facebook/docusaurus#6706 Should SSG deploying to Vercel document that |
please show me how and were to find the vercel.json files to edit this in. |
Hey!
FYI, Vercel has a
cleanUrls
option forvercel.json
.When set to
true
, all HTML files and Serverless Functions will have their extension removed. When visiting a path that ends with the extension, a 308 response will redirect the client to the extensionless path.For example, a static file named
about.html
will be served when visiting the/about
path. Visiting/about.html
will redirect to/about
.Similarly, a Serverless Function named
api/user.go
will be served when visiting/api/user
. Visiting/api/user.go
will redirect to/api/user
.https://vercel.com/docs/configuration#project/clean-urls
The text was updated successfully, but these errors were encountered: