This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demo: show how to use multiple APIs with different sidebars configura…
…tions
- Loading branch information
1 parent
b56d885
commit 9c55073
Showing
18 changed files
with
222 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Combined sidebars | ||
|
||
This puts multiple APIs into a single visible sidebar. | ||
|
||
```yaml | ||
combined: | ||
- page: combined/index.md | ||
- page: combined/rock.page.yaml | ||
- page: combined/paper.page.yaml | ||
- page: combined/scissors.page.yaml | ||
``` | ||
:::note Pagination | ||
We've paginated the rock, paper, and scissors APIs differently as well. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: reference-docs | ||
definitionId: paper | ||
settings: | ||
pagination: section | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: reference-docs | ||
definitionId: rock | ||
settings: | ||
pagination: none | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: Go | ||
- lang: PHP | ||
- lang: Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: reference-docs | ||
definitionId: scissors | ||
settings: | ||
pagination: item | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Drilldown style of sidebars | ||
|
||
This shows the drilldown style of sidebars. | ||
|
||
Notice that the `/*` is appended to the `rock.page.yaml` and `paper.page.yaml` files to avoid an extra group. | ||
We remove the `/*` from the `scissors.page.yaml` file so you can see the difference. | ||
|
||
```yaml | ||
drilldown-style: | ||
- page: drilldown/index.md | ||
- group: Rock | ||
menuStyle: drilldown | ||
icon: images/rock.png | ||
sublabel: Rock API docs | ||
pages: | ||
- page: openapi/rock.page.yaml/* | ||
- group: Paper | ||
menuStyle: drilldown | ||
icon: images/paper.png | ||
sublabel: Paper API docs | ||
pages: | ||
- page: openapi/paper.page.yaml/* | ||
- group: Scissors | ||
menuStyle: drilldown | ||
icon: images/scissors.png | ||
sublabel: Scissors API docs | ||
pages: | ||
- page: openapi/scissors.page.yaml | ||
``` | ||
:::note Pagination | ||
We've paginated the rock, paper, and scissors APIs differently as well. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: reference-docs | ||
definitionId: paper | ||
settings: | ||
pagination: section | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: reference-docs | ||
definitionId: rock | ||
settings: | ||
pagination: none | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: Go | ||
- lang: PHP | ||
- lang: Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: reference-docs | ||
definitionId: scissors | ||
settings: | ||
pagination: item | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
type: redoc | ||
type: reference-docs | ||
definitionId: rock | ||
showInfo: true | ||
expand: true | ||
settings: | ||
pagination: none | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java | ||
- lang: Go | ||
- lang: PHP | ||
- lang: Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Separate sidebars | ||
|
||
This makes separate sidebars (all within a single `sidebars.yaml` file). | ||
|
||
Notice we use the `/*` to eliminate one grouping level in the scissors and rock APIs. | ||
You will visually see the difference between those and the paper API. | ||
|
||
```yaml | ||
## different sidebars | ||
rock: | ||
- page: separated/rock-quickstart.md | ||
- page: separated/rock.page.yaml/* | ||
paper: | ||
- page: separated/paper.page.yaml | ||
scissors: | ||
- page: separated/scissors.page.yaml/* | ||
|
||
``` | ||
|
||
Use these links to visit those APIs: | ||
|
||
- [Rock](./rock-quickstart.md) | ||
- [Paper](./paper.page.yaml) | ||
- [Scissors](./scissors.page.yaml) | ||
|
||
|
||
:::note Pagination | ||
We've paginated the rock, paper, and scissors APIs differently as well. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: reference-docs | ||
definitionId: paper | ||
settings: | ||
pagination: section | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Rock Quickstart | ||
|
||
This is a quickstart for the Rock API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: reference-docs | ||
definitionId: rock | ||
settings: | ||
pagination: none | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: Go | ||
- lang: PHP | ||
- lang: Ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type: reference-docs | ||
definitionId: scissors | ||
settings: | ||
pagination: item | ||
generateCodeSamples: | ||
languages: | ||
- lang: curl | ||
- lang: JavaScript | ||
- lang: Node.js | ||
- lang: Python | ||
- lang: C# | ||
- lang: Java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters