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

bug(v1): Old docs remain in the gh-pages branch #2123

Closed
yangshun opened this issue Dec 13, 2019 · 6 comments
Closed

bug(v1): Old docs remain in the gh-pages branch #2123

yangshun opened this issue Dec 13, 2019 · 6 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: intermediate Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan. help wanted Asking for outside help and/or contributions to this particular issue or PR. v1 This issue is for Docusaurus 1

Comments

@yangshun
Copy link
Contributor

yangshun commented Dec 13, 2019

🐛 Bug Report

The page "Converting Mutations" was removed from the docs but it still shows up in the Algolia results (search for mutation) can still publicly accessible at https://relay.dev/docs/en/converting-mutations.

I suspect the deploy command is doing a merge with the existing files in the gh-pages branch and not removing the old files which no longer exist.

Update: That's not the reason. Perhaps the relay-classic version is unrecognized by the versioning script. The build artifacts look really odd for classic version.

cc @endiliey

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Go to https://relay.dev/docs/en/converting-mutations

Expected behavior

404

Actual Behavior

Page loads

Reproducible Demo

https://relay.dev/docs/en/converting-mutations

https://github.com/facebook/relay/tree/gh-pages/docs/en/converting-mutations still exists.

@yangshun yangshun added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers difficulty: intermediate Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan. help wanted Asking for outside help and/or contributions to this particular issue or PR. v1 This issue is for Docusaurus 1 and removed status: needs triage This issue has not been triaged by maintainers labels Dec 13, 2019
@endiliey
Copy link
Contributor

endiliey commented Dec 14, 2019

Its not a bug. Its already by design. I have mentioned it so many times that v1 versioning fallback functionality is like this 😂😂 and I think a lot of people are still unaware of it. Thats why I have been advocating the v2 snapshot versioning so many times.

Imagine that this is your first new site. We have two docs, foo/bar.md and hello.md
image

When we cut our first version 1.0.0, this is whats happening. It creates the very first fallback docs
image
No matter what happen in the future, this foo/bar.md and hello.md will always continue to exist in every version. Its called fallback.

Edit:
Its never been possible in v1 versioning to have different set of docs in different version. The new version docs will always be the old version docs + (the new set of docs - similar set of docs (same id in new & old docs))

@endiliey
Copy link
Contributor

Another scenario is https://relay.dev/docs/en/classic-guides-containers

and
https://relay.dev/docs/en/v7.0.0/classic-guides-containers

Relay-classic docs will always remain to every future version.

This is already by design, and the fix is definitely a major breaking change. Why not migrate relay to v2 ? Although It has languages enabled, it only enable 1 language which is english 😱

@yangshun
Copy link
Contributor Author

Oh hmm. Shouldn't the fallback only kick in if it can't find the docs in the current versioned_docs folder? The versioned_sidebar should be the source of truth for a version.

@endiliey
Copy link
Contributor

Not every docs is bounded to a sidebar.

Even https://single-spa.js.org/docs/faq/ intentionally dont want a sidebar.

I can find lot of other cases like this.
Its by design, and unfortunately I am not the designer of the fallback functionality

@endiliey
Copy link
Contributor

Babel for example has a lot of it

The high level docs is here https://babeljs.io/docs/en/7.0.0/plugins

and a lot of the ad-hoc docs is not bound to a sidebar (intentionally)
https://babeljs.io/docs/en/7.0.0/babel-plugin-transform-member-expression-literals

@aldeed
Copy link
Contributor

aldeed commented Jun 17, 2020

I have submitted a PR with a non-breaking change that resolves this issue if you opt in by configuring it. #2955

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 difficulty: intermediate Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan. help wanted Asking for outside help and/or contributions to this particular issue or PR. v1 This issue is for Docusaurus 1
Projects
None yet
Development

No branches or pull requests

3 participants