mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
docs: use Mermaid diagram for routing page (#8335)
This commit is contained in:
parent
571f497df1
commit
57c632becb
6 changed files with 72 additions and 4 deletions
|
@ -17,7 +17,24 @@ Docusaurus' routing system follows single-page application conventions: one rout
|
|||
|
||||
Every content plugin provides a `routeBasePath` option. It defines where the plugins append their routes to. By default, the docs plugin puts its routes under `/docs`; the blog plugin, `/blog`; and the pages plugin, `/`. You can think about the route structure like this:
|
||||
|
||||

|
||||
```mermaid
|
||||
graph LR;
|
||||
A(["https://example.com/"])
|
||||
B(["/base-url/"])
|
||||
C(["/docs/"])
|
||||
D(["/blog/"])
|
||||
E(["/"])
|
||||
F["All docs <br/>routes"]
|
||||
G["All blog <br/>routes"]
|
||||
H["All pages <br/>routes"]
|
||||
A---B;
|
||||
B---C;
|
||||
B---D;
|
||||
B---E;
|
||||
C---F;
|
||||
D---G;
|
||||
E---H;
|
||||
```
|
||||
|
||||
Any route will be matched against this nested route config until a good match is found. For example, when given a route `/docs/configuration`, Docusaurus first enters the `/docs` branch, and then searches among the subroutes created by the docs plugin.
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
|
@ -17,7 +17,24 @@ Docusaurus' routing system follows single-page application conventions: one rout
|
|||
|
||||
Every content plugin provides a `routeBasePath` option. It defines where the plugins append their routes to. By default, the docs plugin puts its routes under `/docs`; the blog plugin, `/blog`; and the pages plugin, `/`. You can think about the route structure like this:
|
||||
|
||||

|
||||
```mermaid
|
||||
graph LR;
|
||||
A(["https://example.com/"])
|
||||
B(["/base-url/"])
|
||||
C(["/docs/"])
|
||||
D(["/blog/"])
|
||||
E(["/"])
|
||||
F["All docs <br/>routes"]
|
||||
G["All blog <br/>routes"]
|
||||
H["All pages <br/>routes"]
|
||||
A---B;
|
||||
B---C;
|
||||
B---D;
|
||||
B---E;
|
||||
C---F;
|
||||
D---G;
|
||||
E---H;
|
||||
```
|
||||
|
||||
Any route will be matched against this nested route config until a good match is found. For example, when given a route `/docs/configuration`, Docusaurus first enters the `/docs` branch, and then searches among the subroutes created by the docs plugin.
|
||||
|
||||
|
|
|
@ -17,7 +17,24 @@ Docusaurus' routing system follows single-page application conventions: one rout
|
|||
|
||||
Every content plugin provides a `routeBasePath` option. It defines where the plugins append their routes to. By default, the docs plugin puts its routes under `/docs`; the blog plugin, `/blog`; and the pages plugin, `/`. You can think about the route structure like this:
|
||||
|
||||

|
||||
```mermaid
|
||||
graph LR;
|
||||
A(["https://example.com/"])
|
||||
B(["/base-url/"])
|
||||
C(["/docs/"])
|
||||
D(["/blog/"])
|
||||
E(["/"])
|
||||
F["All docs <br/>routes"]
|
||||
G["All blog <br/>routes"]
|
||||
H["All pages <br/>routes"]
|
||||
A---B;
|
||||
B---C;
|
||||
B---D;
|
||||
B---E;
|
||||
C---F;
|
||||
D---G;
|
||||
E---H;
|
||||
```
|
||||
|
||||
Any route will be matched against this nested route config until a good match is found. For example, when given a route `/docs/configuration`, Docusaurus first enters the `/docs` branch, and then searches among the subroutes created by the docs plugin.
|
||||
|
||||
|
|
|
@ -17,7 +17,24 @@ Docusaurus' routing system follows single-page application conventions: one rout
|
|||
|
||||
Every content plugin provides a `routeBasePath` option. It defines where the plugins append their routes to. By default, the docs plugin puts its routes under `/docs`; the blog plugin, `/blog`; and the pages plugin, `/`. You can think about the route structure like this:
|
||||
|
||||

|
||||
```mermaid
|
||||
graph LR;
|
||||
A(["https://example.com/"])
|
||||
B(["/base-url/"])
|
||||
C(["/docs/"])
|
||||
D(["/blog/"])
|
||||
E(["/"])
|
||||
F["All docs <br/>routes"]
|
||||
G["All blog <br/>routes"]
|
||||
H["All pages <br/>routes"]
|
||||
A---B;
|
||||
B---C;
|
||||
B---D;
|
||||
B---E;
|
||||
C---F;
|
||||
D---G;
|
||||
E---H;
|
||||
```
|
||||
|
||||
Any route will be matched against this nested route config until a good match is found. For example, when given a route `/docs/configuration`, Docusaurus first enters the `/docs` branch, and then searches among the subroutes created by the docs plugin.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue