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

Better error message when missing versions.js file #369

Closed
JoelMarcey opened this issue Jan 3, 2018 · 5 comments
Closed

Better error message when missing versions.js file #369

JoelMarcey opened this issue Jan 3, 2018 · 5 comments
Labels
documentation The issue is related to the documentation of Docusaurus feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: claimed Issue has been claimed by a contributor who plans to work on it.

Comments

@JoelMarcey
Copy link
Contributor

Is this a bug report?

No

Have you read the [Contributing Guidelines]

Yes

Environment

N/A

Steps to Reproduce

See #333 (comment)

Expected Behavior

Better error message telling user that they might be missing versions.js file.

Actual Behavior

404 for versions.html missing

Reproducible Demo

#333 (comment)

@JoelMarcey JoelMarcey added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. documentation The issue is related to the documentation of Docusaurus labels Feb 27, 2018
@sujono91
Copy link
Contributor

@JoelMarcey

Hi Joel, I'm interested to work in this issue. Could u give me the right direction of how to solve this issue? (such as message format, etc) 😄

@JoelMarcey JoelMarcey added the status: claimed Issue has been claimed by a contributor who plans to work on it. label May 13, 2018
@JoelMarcey
Copy link
Contributor Author

Hi @sujono91, thanks for taking this on.

I think there are a couple of ways to tackle this:

  1. You can create a console message in https://github.com/facebook/Docusaurus/blob/master/lib/version.js if a versions.js file does not exist in the pages directory. This would solve the problem if someone ran the version script before creating the versions.js page (like is done when someone follows the instructions here and runs yarn examples versions first).

  2. You can do something in https://github.com/facebook/Docusaurus/blob/master/lib/core/nav/HeaderNav.js and check to see if env.versioning.enabled is true and if so, and there is no versions.js page, then something happens like an error in the log and/or a message in the header nav or something.

Does this help you get started?

@sujono91
Copy link
Contributor

@JoelMarcey Ok, I'll try it right now. Will let u know if i've any concern

@sujono91
Copy link
Contributor

@JoelMarcey I think we can close this issue

@yangshun
Copy link
Contributor

Yes you're right! For future reference, you can also add "Fixes #369" in your PR and when your PR is merged, the issue will be closed automatically 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation The issue is related to the documentation of Docusaurus feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: claimed Issue has been claimed by a contributor who plans to work on it.
Projects
None yet
Development

No branches or pull requests

3 participants