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

fix: wrong sidebar_label and title on versioned_docs #1265

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Mar 6, 2019

Motivation

Fix #1259

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Use this reproducible demo https://github.com/amimas/docusaurus-1259

Use this PR patch

Go to /docs/.

Note that the v1.0.0 docs file is like this:

---
id: version-1.0.0-index
title: This is main page
sidebar_label: Main page
original_id: index
---

## Mauris In Code

Mauris vestibulum ullamcorper nibh, ut semper purus pulvinar ut. Donec volutpat orci sit amet mauris malesuada, non pulvinar augue aliquam. Vestibulum ultricies at urna ut suscipit. Morbi iaculis, erat at imperdiet semper, ipsum nulla sodales erat, eget tincidunt justo dui quis justo. Pellentesque dictum bibendum diam at aliquet. Sed pulvinar, dolor quis finibus ornare, eros odio facilisis erat, eu rhoncus nunc dui sed ex. Nunc gravida dui massa, sed ornare arcu tincidunt sit amet. Maecenas efficitur sapien neque, a laoreet libero feugiat ut.

Before (wrong sidebar_label and title)
before

After
after

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 6, 2019
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 5accf5c

https://deploy-preview-1265--docusaurus-preview.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 065eb09

https://deploy-preview-1265--docusaurus-preview.netlify.com

Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this problem always existed? We have a few projects that use versioning, and I don't recall this happening.

@endiliey
Copy link
Contributor Author

endiliey commented Mar 6, 2019

Happens only if the next release document changed its sidebar_label/title, and there are two files with the same id (but different subdirectory).

Its quite rare, i guess

@yangshun yangshun merged commit c73da00 into facebook:master Mar 6, 2019
@endiliey endiliey deleted the 1259 branch March 7, 2019 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants