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 duplicate routes error #1390

Merged
merged 7 commits into from
Nov 19, 2021

Conversation

nibble0101
Copy link
Contributor

@nibble0101 nibble0101 commented Nov 7, 2021

This PR fixes the duplicate routes error.

warn Duplicate routes found! This could lead to non-deterministic routing behavior

Attempting to create page at /docs/howto/file-box, but a page already exists at this route
Attempting to create page at /docs/specs/, but a page already exists at this route

Essentially the first warning is due to two files in the howto directory with the same name file-box.
image

I have also realized the file naming is not consistent with the side-bar label making it more difficult to maintain. The file is file-box.mdx but the side-bar label is Send and receive files. However if the side-bar label is consistent with the file name it is easier to locate which .md or .mdx one should edit to fix an error. So I have changed the file-names accordingly. Let me know what others think.

There were two similar file-box files. One is file-box.md and another is file-box.mdx. I am not sure why? I think it is better to decide which one is the required one and the other one needs to be deleted otherwise they become a source of confusion.

@huan I have failed to reproduce the last two errors.

#1388

@nibble0101 nibble0101 requested a review from a team as a code owner November 7, 2021 17:57
@nibble0101 nibble0101 requested a review from huan November 7, 2021 17:58
@huan
Copy link
Member

huan commented Nov 8, 2021

Thank you very much for the quick response!

I saw you renamed the file-box, but as my understanding, we will have a file/id named file-box in our folders correct?

Could you please help us to make sure that there are no orphan files in the folders? Because it seems that we have multiple file-box now.

And one more thing that, I think the file-box name is better for the file-name/id so please use this name if we can.

Thank you very much!

@shraddhavp shraddhavp self-requested a review November 14, 2021 03:54
@nibble0101
Copy link
Contributor Author

nibble0101 commented Nov 16, 2021

Could you please help us to make sure that there are no orphan files in the folders? Because it seems that we have multiple file-box now.

@huan Actually the warning was due to two files named file-box in the same directory. One was named file-box.md and the other file-box.mdx. I don't know why there are two files in the first place otherwise I would have deleted one. I have reverted the file name to file-box.mdx since you asked to retain the file names and renamed the other one to file-box-two.md to remove the warning .

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

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

LGTM

@nibble0101 nibble0101 merged commit 7ac177b into wechaty:main Nov 19, 2021
@nibble0101 nibble0101 deleted the fix-duplicate-routes-error branch November 19, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants