Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 7abf39c

Browse files
committed
convert all old CodeWithTabs to new Tabs
1 parent f4c1bf2 commit 7abf39c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2032
-738
lines changed

docs/apis.mdx

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,11 @@ func main() {
710710

711711
By default APIs deployed by Nitric will be assigned a domain by the target cloud provider. If you would like to deploy APIs with predefined custom domains you can specify the custom domains for each API in your project's stack files. For these domains to be successfully configured you will need to meet the prerequisites defined for each cloud provider below.
712712

713-
<CodeWithTabs>
713+
<Tabs syncKey="providers">
714714

715-
```yaml !!tabs AWS file:nitric.prod.yaml
715+
<TabItem label="AWS">
716+
717+
```yaml file:nitric.prod.yaml
716718
provider: nitric/[email protected]
717719
region: ap-southeast-2
718720

@@ -725,23 +727,35 @@ apis:
725727
- test.example.com
726728
```
727729
728-
```yaml !!tabs Azure file:nitric.prod.yaml
730+
</TabItem>
731+
732+
<TabItem label="Azure">
733+
734+
```yaml file:nitric.prod.yaml
729735
# currently unsupported - request support here: https://github.com/nitrictech/nitric/issues
730736
```
731737

732-
```yaml !!tabs Google Cloud file:nitric.prod.yaml
738+
</TabItem>
739+
740+
<TabItem label="Google Cloud">
741+
742+
```yaml file:nitric.prod.yaml
733743
# currently unsupported - request support here: https://github.com/nitrictech/nitric/issues
734744
```
735745

736-
</CodeWithTabs>
746+
</TabItem>
747+
748+
</Tabs>
737749

738750
## Custom Descriptions
739751

740752
By default, APIs will not be deployed with a description. You can add a description using the following configuration in your stack file.
741753

742-
<CodeWithTabs>
754+
<Tabs syncKey="providers">
743755

744-
```yaml !!tabs AWS file:nitric.prod.yaml
756+
<TabItem label="AWS">
757+
758+
```yaml file:nitric.prod.yaml
745759
provider: nitric/[email protected]
746760
region: ap-southeast-2
747761

@@ -753,7 +767,11 @@ apis:
753767
description: An AWS API
754768
```
755769
756-
```yaml !!tabs Azure file:nitric.prod.yaml
770+
</TabItem>
771+
772+
<TabItem label="Azure">
773+
774+
```yaml file:nitric.prod.yaml
757775
provider: nitric/[email protected]
758776
region: Australia East
759777
org: example-org
@@ -766,7 +784,11 @@ apis:
766784
description: An Azure API
767785
```
768786
769-
```yaml !!tabs Google Cloud file:nitric.prod.yaml
787+
</TabItem>
788+
789+
<TabItem label="Google Cloud">
790+
791+
```yaml file:nitric.prod.yaml
770792
provider: nitric/[email protected]
771793
region: australia-southeast1
772794

@@ -778,7 +800,9 @@ apis:
778800
description: A GCP API
779801
```
780802
781-
</CodeWithTabs>
803+
</TabItem>
804+
805+
</Tabs>
782806
783807
### AWS Custom Domain Prerequisites
784808

docs/get-started/foundations/infrastructure/index.mdx

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ Sometimes it's easier to explain IfC by exploring the benefits.
2424

2525
Nitric significantly reduces or removes cloud-specific code. For example, accessing a file in a cloud storage bucket with Nitric is just a few lines of code, while the equivalent code using cloud provider SDKs is much more verbose and error prone:
2626

27-
<CodeWithTabs>
27+
<Tabs>
2828

29-
```javascript !!tabs Nitric SDK
29+
<TabItem label="Nitric SDK">
30+
31+
```javascript
3032
import { bucket } from '@nitric/sdk'
3133

3234
const profiles = bucket('profiles').allow('read')
@@ -36,7 +38,11 @@ export const getProfilePic = async (filename) => {
3638
}
3739
```
3840

39-
```javascript !!tabs AWS SDK
41+
</TabItem>
42+
43+
<TabItem label="AWS SDK">
44+
45+
```javascript
4046
import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3'
4147

4248
const client = new S3Client({})
@@ -57,7 +63,9 @@ export const getProfilePic = async (filename) => {
5763
}
5864
```
5965

60-
</CodeWithTabs>
66+
</TabItem>
67+
68+
</Tabs>
6169

6270
---
6371

@@ -79,25 +87,41 @@ export const publishMessage = async (message) => {
7987

8088
We can change the underlying messaging service through a simple configuration change, without modifying the application code.
8189

82-
<CodeWithTabs>
90+
<Tabs>
91+
92+
<TabItem label="AWS">
8393

84-
```yaml !!tabs AWS file:nitric.prod.yaml
94+
```yaml file:nitric.prod.yaml
8595
provider: nitric/[email protected]
8696
```
8797
88-
```yaml !!tabs Azure file:nitric.prod.yaml
98+
</TabItem>
99+
100+
<TabItem label="Azure">
101+
102+
```yaml file:nitric.prod.yaml
89103
provider: nitric/[email protected]
90104
```
91105
92-
```yaml !!tabs Google Cloud file:nitric.prod.yaml
106+
</TabItem>
107+
108+
<TabItem label="Google Cloud">
109+
110+
```yaml file:nitric.prod.yaml
93111
provider: nitric/[email protected]
94112
```
95113
96-
```yaml !!tabs Anything Else file:nitric.prod.yaml
114+
</TabItem>
115+
116+
<TabItem label="Anything Else">
117+
118+
```yaml file:nitric.prod.yaml
97119
provider: your_namespace/[email protected]
98120
```
99121
100-
</CodeWithTabs>
122+
</TabItem>
123+
124+
</Tabs>
101125
102126
<Note>
103127
The runtime code for cloud services like SNS still exists, it's just isolated

docs/get-started/foundations/projects/index.mdx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ We recommend starting with a template, using the `nitric new` CLI command. These
2424

2525
Here are some examples of basic Nitric project structures:
2626

27-
<CodeWithTabs>
27+
<Tabs>
2828

29-
```text !!tabs Go
29+
<TabItem label="Go">
30+
31+
```text Go
3032
my-project/
3133
├── nitric.yaml
3234
├── nitric.aws.yaml
@@ -37,7 +39,11 @@ my-project/
3739
└── main.go
3840
```
3941

40-
```text !!tabs JavaScript
42+
</TabItem>
43+
44+
<TabItem label="JavaScript">
45+
46+
```text JavaScript
4147
my-project/
4248
├── nitric.yaml
4349
├── nitric.aws.yaml
@@ -46,7 +52,11 @@ my-project/
4652
└── service2.js
4753
```
4854

49-
```text !!tabs Python
55+
</TabItem>
56+
57+
<TabItem label="Python">
58+
59+
```text Python
5060
my-project/
5161
├── nitric.yaml
5262
├── nitric.aws.yaml
@@ -55,7 +65,9 @@ my-project/
5565
└── service2.py
5666
```
5767

58-
</CodeWithTabs>
68+
</TabItem>
69+
70+
</Tabs>
5971

6072
This flexibility allows you to build apps as a single monolithic service, multiple microservices, or something else entirely.
6173

0 commit comments

Comments
 (0)