Skip to content

Commit

Permalink
fix: convert .md files to .mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
esemyonov committed Dec 26, 2023
1 parent bd73585 commit 778accb
Show file tree
Hide file tree
Showing 240 changed files with 80 additions and 155 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/articles/cache.md → docs/articles/cache.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface CacheQueryOptions {
}
```

:::warning
:::caution

At this time, the `options` parameter will be ignored entirely when running on
in a developer environment (i.e. working copy). In non-developer environments,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ policies:
A CORS policy consists of a name and set of CORS headers to be returned for
cross-origin requests (both the simple type and pre-flight request).

:::warning
:::caution

Make sure to not have a trailing `/` on your allowedOrigins. e.g.
`https://example.com` is valid, `https://example.com/` will not work.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else. You can override this by setting an
[environment variable](../articles/environment-variables) called
`ZUPLO_LOG_LEVEL` to one of the values above.

:::warning The log levels are case sensitive - they must be entered correctly,
:::caution The log levels are case sensitive - they must be entered correctly,
in lower case for logging to work. :::

The log levels map to the different methods on `context.log`, e.g.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ There are two distinct types of environment:
shared with anybody else. If you share a project with another person, they
will have their own working-copy environment.

:::warning Never use a working-copy environment in a production setting. They
:::caution Never use a working-copy environment in a production setting. They
offer no SLA, and will often sleep after inactivity leading to slower cold-start
times. There can be occasional downtime of a few seconds for upgrades. :::

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ single location worldwide).
The MemoryZoneReadthroughCache offers the best of both worlds - it uses memory
and zone cache in combination to afford the lowest possible latency.

:::warning
:::caution

Do take care not to load so much data into memory that you OOM (out-of-memory)
your process. Processes in Zuplo typically have ~120MB of memory to perform all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ locally.

## Configuring API Keys

:::warning
:::caution

As the .env.zuplo file could contain sensitive information, it should not be
committed to your version system. Consider adding .env to your .gitignore file.
Expand All @@ -146,7 +146,7 @@ You will be using the API keys from the working-copy of your project.

## Configuring Environment variables

:::warning
:::caution

As the .env file could contain sensitive information, it should not be committed
to your version system. Consider adding .env to your .gitignore file.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default async function (request: ZuploRequest, context: ZuploContext) {
By default, we send all metrics to Dynatrace. However, you have the option below
to configure which metrics you want to send.

:::warning Strict format
:::caution Strict format

Dynatrace has a strict format for its payload, which has some _surprising_
requirements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ everything organized). The three policies required are:
1. [Any JWT Authentication Policy](../policies/open-id-jwt-auth-inbound.md)
1. [A Custom Policy](../policies/custom-code-inbound.md)

:::warning
:::caution

The order of these policies is critical. Placing them in the wrong order can
cause errors or lead to security issues.
Expand Down
15 changes: 15 additions & 0 deletions docs/articles/node-modules.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Node Modules
---

import BundlesTable from "@site/src/components/mdx/BundlesTable";

Zuplo generally supports node modules, but to ensure the security and
performance of each API Gateway we must approve each module. This process only
takes a few hours so if you need something new please reach out to use on
twitter [@zuplo](https://twitter.com/zuplo) or through email
[[email protected]](mailto:[email protected])

Below are the currently installed modules.

<BundlesTable />
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function runtimeInit(runtime: RuntimeExtensions) {

```
:::warning
:::caution
An error in your `zuplo.runtime.ts` can break your gateway for all requests. Be
sure to carefully review any custom code in this file and add generous error
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ per-policy basis, there are times when behaviors need to be modified globally.
To plug into the global initialization of your gateway, create a file called
`zuplo.runtime.ts` in the `modules` folder with the following code.

:::warning
:::caution

Any error thrown in the `runtimeInit` method will prevent the gateway from
starting and yield a 500 error for all requests. Be sure to add only reliable
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: Source Control
---

import GithubSetup from './\_github-setup.md';

:::info

Gitlab and Bitbucket Support
Expand All @@ -23,17 +21,16 @@ benefits, including:
- ability to deploy an [edge-deployment](../articles/environments.md) just by
adding a branch or making a commit.

<GithubSetup />

## Connecting Existing Repositories

If you have an existing GitHub repository that contains a Zuplo project, you can
connect to that repository when you create a new project. Select **Advanced**
then select your GitHub organization and repository.

<Screenshot
src="https://cdn.zuplo.com/assets/f09aa7ac-abc0-4f20-9e41-df42b7761748.png"
size="sm" />
src="https://cdn.zuplo.com/assets/f09aa7ac-abc0-4f20-9e41-df42b7761748.png"
size="sm"
/>

## Limitations

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/articles/support.md → docs/articles/support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ After entering your support code a ticket will be opened and our on call support
team will reach out to you within a few minutes. We suggest you sign in to
discord as well so we can chat in real time.

:::warning
:::caution

Calling this number will alert our on call team at any hour. Please only use
this number for urgent, business critical issues.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ of the file is `1`.
}
```

:::warning
:::caution

The `zuplo.jsonc` file is not currently shown or editable in the Zuplo portal.
Connect your project to source control and edit inside your source control
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions docs/cli/index.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on any route.

Configure the properties for your AWS Lambda function.

:::warning
:::caution

Don't add the AWS Secure Access Key directly in the `routes.oas.json` file.
Instead use environment variables like `$env(AWS_SECURE_ACCESS_KEY)`
Expand Down
File renamed without changes.
14 changes: 0 additions & 14 deletions docs/handlers/index.mdx

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 0 additions & 42 deletions docs/intro.mdx

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion policies/composite-inbound/intro.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The Composite policy allows you to create groups of other policies, for easy
reuse across multiple routes. Other policies are referenced by their `name`.

:::warning
:::caution

Be careful not to create circular references which can cause your gateway to
fail.
Expand Down
2 changes: 1 addition & 1 deletion policies/geo-filter-inbound/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Specify an allow list or block list of:
example, "TX"
- **ASNs** - ASN of the incoming request, for example, 395747.

:::warning
:::caution

If you specify an allow and block list for the same location type (e.g.
`country`) may have no effect or block all requests.
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
62 changes: 0 additions & 62 deletions src/app/articles/node-modules/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/build/navigation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function buildNavSection(rawSection) {
href: `/${item}`,
});
} else {
const docPath = path.resolve(path.join("docs", `${item}.md`));
const docPath = path.resolve(path.join("docs", `${item}.mdx`));
const docMd = fs.readFileSync(docPath, "utf8");
const { data } = matter(docMd);
section.items.push({
Expand Down
38 changes: 38 additions & 0 deletions src/components/mdx/BundlesTable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from "react";
import Link from "next/link";
import data from "../../../bundles.json";

const BundlesTable: React.FC<{ url: string }> = ({ url }) => {
return (
<table>
<thead>
<tr>
<td>Module</td>
<td>Version</td>
<td>Description</td>
</tr>
</thead>
<tbody>
{data.bundles.map((bundle) => (
<tr key={bundle.name}>
<td>
<Link
href={
bundle.url ?? `https://www.npmjs.com/package/${bundle.name}`
}
rel="noopener noreferrer"
target="_blank"
>
{bundle.name}
</Link>
</td>
<td>{bundle.version}</td>
<td>{bundle.description}</td>
</tr>
))}
</tbody>
</table>
);
};

export default BundlesTable;
2 changes: 2 additions & 0 deletions src/components/mdx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
SettingsTabIcon,
ShowIcon,
} from "./ui-icons";
import BundlesTable from "@/components/mdx/BundlesTable";

const components = {
FeaturePremiere,
Expand All @@ -30,6 +31,7 @@ const components = {
ShowIcon,
GitHubIcon,
Screenshot,
BundlesTable,
};

export default components;
Loading

0 comments on commit 778accb

Please sign in to comment.