Skip to content

Commit

Permalink
docs: remove steps
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghuan committed Sep 24, 2024
1 parent 90afb3e commit 3627e45
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 132 deletions.
6 changes: 1 addition & 5 deletions content/docs/en/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ The `config` folder houses various files ready for customization to suit your ne

Here's the list of config files available:

<Steps>

### Landing

Within `landing.ts`, discover data configurations for different sections on the homepage.
Expand Down Expand Up @@ -55,6 +53,4 @@ Here's the structure for a pricing card:
yearly: env.NEXT_PUBLIC_STRIPE_PRO_YEARLY_PLAN_ID,
},
},
```

</Steps>
```
10 changes: 2 additions & 8 deletions content/docs/en/configuration/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Currently this project use **Neon** on the free plan. Check their [pricing page]

## Steps

<Steps>

### Create Neon account

If don't have an account on Neon, just follow their steps [here](https://neon.tech/docs/get-started-with-neon/signing-up) for create one.
Expand All @@ -19,10 +17,8 @@ If don't have an account on Neon, just follow their steps [here](https://neon.te

After create a project on Neon, you can copy the database url. Select `Prisma` from the list then the `env` tab.

<Callout type="warning">
<b>Don't forget</b> to reveal the information hidden behind the stars using
the eye icon. It's not very visible in dark mode.
</Callout>
<b>Don't forget</b> to reveal the information hidden behind the stars using
the eye icon. It's not very visible in dark mode.

Paste in your `.env` file.

Expand All @@ -37,5 +33,3 @@ You can push the migrations on your database with the cli.
```bash
npx prisma db push
```

</Steps>
36 changes: 10 additions & 26 deletions content/docs/en/configuration/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,19 @@ title: Email
description: How to manage emails in this project.
---

<Callout type="success" twClass="mt-0">
The magic-link feature with Resend works with Auth.js v5! <br />
You can use it in your local environment and in your own production setup.
</Callout>
The magic-link feature with Resend works with Auth.js v5! <br />
You can use it in your local environment and in your own production setup.

<Callout type="warning" twClass="mt-2.5">
However, you can't test it on this demo app because I don't want to use the
premium Resend plan for this demo.
</Callout>

## Steps
However, you can't test it on this demo app because I don't want to use the
premium Resend plan for this demo.

<Callout type="note">
The email part is similar at the [resend](https://resend.com/) documentation.
You can find the official documentation
[here](https://authjs.dev/getting-started/installation#setup-environment) if
you want.
</Callout>
## Steps

<Steps>
The email part is similar at the [resend](https://resend.com/) documentation.
You can find the official documentation
[here](https://authjs.dev/getting-started/installation#setup-environment) if
you want.

### Create an account

Expand All @@ -36,13 +29,4 @@ Copy/paste in your `.env` file.

```js
RESEND_API_KEY = re_your_resend_api_key;
```

</Steps>

{/*
react-email
> [!WARNING]
> You need update `.react-email` folder before use `pnpm run email`. Check the link [here](https://github.com/resend/react-email/issues/868#issuecomment-1828411325) if you have the error : `renderToReadableStream not found`
*/}
```
6 changes: 1 addition & 5 deletions content/docs/en/configuration/markdown-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ You can customize this file according to your project's needs by adding new docu

Here's the list of all frontmatters available for each parts:

<Steps>

### Authors

```md
Expand Down Expand Up @@ -195,6 +193,4 @@ date: 2022-11-18
title: Privacy
description: The Privacy Policy for your app.
---
```

</Steps>
```
14 changes: 3 additions & 11 deletions content/docs/en/configuration/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ title: Subscriptions
description: How to manage subscriptions with Stripe.
---

<Callout type="warning" twClass="mt-0">
To complete this guide, you'll need to create an account on
[Stripe](https://stripe.com/).
</Callout>
To complete this guide, you'll need to create an account on
[Stripe](https://stripe.com/).

## Configuration

<Steps>

### Create a Project

After logging in, create a project on Stripe.
Expand Down Expand Up @@ -62,8 +58,4 @@ NEXT_PUBLIC_STRIPE_BUSINESS_YEARLY_PLAN_ID = price_FaKeId

Ensure that you replace `price_FaKeId` with the actual price IDs generated by Stripe for your pricing plans.

<Callout type="warning">
Don't forget to change the prices in `config/subscriptions.ts`.
</Callout>

</Steps>
Don't forget to change the prices in `config/subscriptions.ts`.
14 changes: 4 additions & 10 deletions content/docs/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: Installation
description: How to install the project.
---

<Steps>

### Create project

Start by creating a new Next.js project using `create-next-app`:
Expand All @@ -17,11 +15,9 @@ Or deploy with Vercel :

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhunterzhang86%2Ffflow-next)

<Callout type="warning" twClass="mt-4">
A good way to create your repository, but the deployment will fail because you
need to add your environment variables locally in your project. Follow the
documentation for that.
</Callout>
A good way to create your repository, but the deployment will fail because you
need to add your environment variables locally in your project. Follow the
documentation for that.

### Install dependencies

Expand Down Expand Up @@ -60,6 +56,4 @@ NEXT_PUBLIC_STRIPE_BUSINESS_YEARLY_PLAN_ID=

### Configuration part

Let's check the configuration part for update all environment variables before use `pnpm run dev`.

</Steps>
Let's check the configuration part for update all environment variables before use `pnpm run dev`.
30 changes: 5 additions & 25 deletions content/docs/zh/configuration/authentification.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ title: 身份验证
description: 如何配置身份验证。
---

<Callout type="note" twClass="mt-0">
身份验证部分与 [authjs](https://authjs.dev/) 文档类似。
如果您愿意,可以参考官方文档
[这里](https://authjs.dev/getting-started/installation#setup-environment)
</Callout>
身份验证部分与 [authjs](https://authjs.dev/) 文档类似。
如果您愿意,可以参考官方文档
[这里](https://authjs.dev/getting-started/installation#setup-environment)

<Callout type="danger" twClass="mt-3">
升级到 Auth.js v5 后: `NEXTAUTH_URL` 已从 `.env` 文件中移除。在**生产环境**中也是如此。
</Callout>
升级到 Auth.js v5 后: `NEXTAUTH_URL` 已从 `.env` 文件中移除。在**生产环境**中也是如此。

## 更新 auth_secret 变量

Expand Down Expand Up @@ -44,21 +40,5 @@ GOOGLE_CLIENT_SECRET = your_secret_client;

观看来自 [CodeWithAntonio](https://www.youtube.com/@codewithantonio) 的 YouTube 视频,了解如何为 NextAuth 配置 Google 身份验证的环境变量。

<iframe
className="mt-6 aspect-video w-full"
src="https://www.youtube.com/embed/1MTyCvS05V4"
title="Next Auth V5 - 高级指南 (2024)"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen"
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
></iframe>
- GoogleAuth **本地**配置在 [3:24:30](https://www.youtube.com/watch?v=1MTyCvS05V4&t=12270s)
- **部署后**更新 GoogleAuth 在 [7:52:31](https://www.youtube.com/watch?v=1MTyCvS05V4&t=12270s)

### 本仓库的 Google 配置

<img
className="mt-4 overflow-hidden rounded-lg border"
src="/_static/docs/gg-auth-config.jpg"
/>
- **部署后**更新 GoogleAuth 在 [7:52:31](https://www.youtube.com/watch?v=1MTyCvS05V4&t=12270s)
6 changes: 1 addition & 5 deletions content/docs/zh/configuration/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 通过配置文件来个性化定制。

以下是可用的配置文件列表:

<Steps>

### 首页

`landing.ts` 中,您可以找到首页不同部分的数据配置。
Expand Down Expand Up @@ -55,6 +53,4 @@ description: 通过配置文件来个性化定制。
yearly: env.NEXT_PUBLIC_STRIPE_PRO_YEARLY_PLAN_ID,
},
},
```

</Steps>
```
4 changes: 0 additions & 4 deletions content/docs/zh/configuration/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: 如何配置你的 Neon 数据库。

## 步骤

<Steps>

### 创建 Neon 账户

如果你还没有 Neon 账户,只需按照[这里](https://neon.tech/docs/get-started-with-neon/signing-up)的步骤创建一个。
Expand All @@ -36,5 +34,3 @@ DATABASE_URL = "postgres://alex:[email protected].
```bash
npx prisma db push
```

</Steps>
28 changes: 6 additions & 22 deletions content/docs/zh/configuration/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@ title: 电子邮件
description: 如何在此项目中管理电子邮件。
---

<Callout type="success" twClass="mt-0">
Resend的魔法链接功能与Auth.js v5兼容! <br />
您可以在本地环境和自己的生产设置中使用它。
</Callout>
Resend的魔法链接功能与Auth.js v5兼容! <br />
您可以在本地环境和自己的生产设置中使用它。

<Callout type="warning" twClass="mt-2.5">
然而,您无法在这个演示应用中测试它,因为我不想为这个演示使用Resend的高级计划。
</Callout>
然而,您无法在这个演示应用中测试它,因为我不想为这个演示使用Resend的高级计划。

## 步骤

<Callout type="note">
电子邮件部分与[resend](https://resend.com/)文档类似。
如果您需要,可以在[这里](https://authjs.dev/getting-started/installation#setup-environment)找到官方文档。
</Callout>

<Steps>
电子邮件部分与[resend](https://resend.com/)文档类似。
如果您需要,可以在[这里](https://authjs.dev/getting-started/installation#setup-environment)找到官方文档。

### 创建账户

Expand All @@ -33,12 +25,4 @@ description: 如何在此项目中管理电子邮件。

```js
RESEND_API_KEY = re_your_resend_api_key;
```

</Steps>

{/*
react-email
> [!WARNING]
> 在使用`pnpm run email`之前,您需要更新`.react-email`文件夹。如果遇到错误:`renderToReadableStream not found`,请查看[此链接](https://github.com/resend/react-email/issues/868#issuecomment-1828411325)
*/}
```
4 changes: 0 additions & 4 deletions content/docs/zh/configuration/markdown-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ export default makeSource({

以下是每个部分可用的所有 frontmatters 列表:

<Steps>

### 作者

```md
Expand Down Expand Up @@ -194,5 +192,3 @@ date: 2022-11-18
---
title
```

</Steps>
8 changes: 1 addition & 7 deletions content/docs/zh/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: 安装
description: 如何安装项目。
---

<Steps>

### 创建项目

首先使用 `create-next-app` 创建一个新的 Next.js 项目:
Expand All @@ -17,9 +15,7 @@ npx create-next-app my-saas-project --example "https://github.com/hunterzhang86/

[![使用 Vercel 部署](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhunterzhang86%2Ffflow-next)

<Callout type="warning" twClass="mt-4">
这是创建你的仓库的好方法,但部署会失败,因为你需要在项目中本地添加环境变量。请按照文档进行操作。
</Callout>
这是创建你的仓库的好方法,但部署会失败,因为你需要在项目中本地添加环境变量。请按照文档进行操作。

### 安装依赖

Expand Down Expand Up @@ -59,5 +55,3 @@ NEXT_PUBLIC_STRIPE_BUSINESS_YEARLY_PLAN_ID=
### 配置部分

在使用 `pnpm run dev` 之前,让我们检查配置部分以更新所有环境变量。

</Steps>

0 comments on commit 3627e45

Please sign in to comment.