Skip to content
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

Validate baseURL #2978

Closed
slorber opened this issue Jun 22, 2020 · 3 comments · Fixed by #2987
Closed

Validate baseURL #2978

slorber opened this issue Jun 22, 2020 · 3 comments · Fixed by #2987
Labels
bug An error in the Docusaurus core causing instability or issues with its execution mlh Major League Hacking Fellowship status: claimed Issue has been claimed by a contributor who plans to work on it.

Comments

@slorber
Copy link
Collaborator

slorber commented Jun 22, 2020

🐛 Bug Report

Using baseUrl without a trailing slash lead to site that does not really work.

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

D2 website with baseUrl: '/build'

It builds but the site does not work once hosted (try to modify yarn serve:v2 script), due to expecting a trailing /

Expected behavior

Should work (normalized to a trailing /), or throw config validation error (requiring user to provide a trailing /)

Actual Behavior

Broken site


@anshulrgoyal as it's related to the validation maybe you could do this later

@slorber slorber added bug An error in the Docusaurus core causing instability or issues with its execution status: claimed Issue has been claimed by a contributor who plans to work on it. v2 mlh Major League Hacking Fellowship labels Jun 22, 2020
@anshulrgoyal
Copy link
Contributor

anshulrgoyal commented Jun 22, 2020

We can include it using regex in current pr next pr.

@anshulrgoyal
Copy link
Contributor

I think validation error makes more sense since there might be some changes in the future and normalize would be done silently, which could result in bugs.

@slorber
Copy link
Collaborator Author

slorber commented Jun 22, 2020

Yes agree, validation is fine. Normalization should rather be used only for "shortcuts", but we should expect users to provide a valid config and be strict about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution mlh Major League Hacking Fellowship status: claimed Issue has been claimed by a contributor who plans to work on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants