-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
[v2] Support index.md filenames / IDs #2537
Comments
Sure, we're open to this. But why don't you create |
Maybe
|
Makes sense 👍 |
I could try to help, although I would need pointers because I've never worked with docusaurus internals. |
This becomes more acute when we run Docusaurus in "docs only" mode because we can't generate the index.html of the root directory. There's also #1973 which is a symptom of this issue IMO, but the proposed workaround #1973 (comment) does not work when using docs only mode! |
A solution similar to vuepress would be nice. If the |
Fixes #6495 This allows website code snippets to be build with `tsc` reducing their error proneness. I converted all code snippets tagged with `tsx?` to separate files. There are other snippets tagged as `jsx?` which I did not convert (yet, at least out of scope for this pr). The chosen directory structure represents the ability to colocate snippets with their respective `.mdx` file. However, we can't move the `.mdx` files into the folder and name them `index.mdx` because that is not supported by docusaurus yet. See facebook/docusaurus#2537 The last commit makes changes to the snippets to make them build. I did not modify the mobx snippets (so they error out at the moment) as I have never used mobx. Somebody else needs to take care of them. The build can be triggered with the npm / yarn task `snippets:build` in the `website` directory. Later on we should add this to the build pipeline so that errors out if the snippets / rnn lib code are out of sync.
This issue totally make sense, it will likely be implemented as part of the "sidebar category index" feature: #2643 |
Implemented as part of #5830 |
please test it in the latest canary and tell us if it works |
🚀 Feature
Docusaurus v1 had a feature where creating an
index.md
file would generate anindex.html
file at the same, relative, directory path:generates
In v2, creating - using the docs plugin - an
index.md
file results in a structure ofindex/index.html
.generates
This requires calling
http://foo.bar/docs/getting-started/index
or evenhttp://foo.bar/docs/getting-started/index.html
which is probably not intentional.Have you read the Contributing Guidelines on issues?
yes
Motivation
Directory structure is important for SEO. Additionally, the index behavior is weird and (I think) unintentional as one ends up with urls like:
http://foo.bar/docs/getting-started/index
orhttp://foo.bar/docs/getting-started/index.html
.Pitch
I think Docusaurus v1 solved this correctly and this should be ported into v2 as well!
The text was updated successfully, but these errors were encountered: