-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
duplicate route detection with autogenerated slugs #9780
Comments
Hi, |
Hi 😄 I have a smiliar issue with the typescript api docs plugin. It generates async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) {
return defaultSidebarItemsGenerator({
...args,
// by default docusaurus treats a file named as the parent directory as the index file as well, which
// collides with the modules.md generated by the typescript API docs.
// see https://docusaurus.io/docs/sidebar/autogenerated#category-index-convention
isCategoryIndex({ fileName, directories }) {
const eligibleDocIndexNames = ['index', 'readme'];
return eligibleDocIndexNames.includes(fileName.toLowerCase());
}
});
} as described here in the docs: https://docusaurus.io/docs/sidebar/autogenerated#category-index-convention The function is working and the categorization as well. However the warning still exists. Is the warning generated independently from the I cross posted this here: typedoc2md/typedoc-plugin-markdown#647 |
@muuki88 we are not the implementor of the typedoc plugin and don't really know how it works internally. Note that there are 2 things to be aware of:
In your case, even though you define If you want to alter the doc URL, you can use the If the typedoc plugin does not enable you to inject a slug front matter, you can try to make an exception with the The warning should disappear once Docusaurus sees that both docs are exposed on 2 distinct URLs. It's here for a reason: currently one of your 2 docs is probably inaccessible. |
Hi @slorber Thanks for the quick and detailed reply ❤️ Makes sense if both are still competing for the same URL. Seems I didn't fully comprehend what the I'll move the discussion to the typedoc-plugin-markdown forum. Should be possible to customize either the And thanks for your great React Newsletter 🤩 |
Sure 👍 Note that |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
I'm trying to diagnose a duplicated route warning, and I'm not sure what the problem is, I suspect it's a bug.
Reproducible demo
https://codesandbox.io/p/devbox/pensive-neumann-8hhhvs
Steps to reproduce
Create a file structure with similar file names, but in different folders. So different ids.
Add them in a TOC with the autogenerated instruction:
In my case, there is only 1 file, or page, living there (see repro) but I do have a folder with the same path.
Expected behavior
I shouldn't see a warning, since there is no file path duplication. Only one page will be rendered at that location.
Actual behavior
I get a duplicated route warning.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: