Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix doc installation #5842

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions packages/site/docs/manual/getting-started/installation.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ order: 1

```bash
# npm
npm install @antv/g6@beta --save
npm install @antv/g6 --save

# pnpm
pnpm add @antv/g6@5
pnpm add @antv/g6

# yarn
yarn add @antv/g6@5
yarn add @antv/g6
```

Import G6 in the code:
Expand All @@ -28,15 +28,14 @@ Visit [G6 npm Example](https://codesandbox.io/p/sandbox/using-g6-from-npm-d9spnr

`@antv/g6` Available on multiple CDNs:

- unpkg: https://unpkg.com/@antv/g6@beta/dist/g6.min.js
- jsDelivr: https://cdn.jsdelivr.net/npm/@antv/g6@beta/dist/g6.min.js
- npmmirror: https://registry.npmmirror.com/@antv/g6/beta/files/dist/g6.min.js
- cdnjs: https://cdnjs.cloudflare.com/ajax/libs/antv-g6/5.0.0-beta.34/g6.min.js
- unpkg: https://unpkg.com/@antv/g6@5/dist/g6.min.js
- jsDelivr: https://cdn.jsdelivr.net/npm/@antv/g6@5/dist/g6.min.js
- npmmirror: https://registry.npmmirror.com/@antv/g6/5/files/dist/g6.min.js

Import G6 using a `script` tag:

```html
<script src="https://unpkg.com/@antv/g6@beta/dist/g6.min.js"></script>
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>
```

Visit [G6 CDN Example](https://codesandbox.io/p/sandbox/using-g6-from-cdn-xt9ty6) to view the complete example code.
15 changes: 7 additions & 8 deletions packages/site/docs/manual/getting-started/installation.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ order: 1

```bash
# npm
npm install @antv/g6@beta --save
npm install @antv/g6 --save

# pnpm
pnpm add @antv/g6@5
pnpm add @antv/g6

# yarn
yarn add @antv/g6@5
yarn add @antv/g6
```

在代码中引入 G6:
Expand All @@ -28,15 +28,14 @@ import { Graph } from '@antv/g6';

`@antv/g6` 在多个 CDN 上提供:

- unpkg: https://unpkg.com/@antv/g6@beta/dist/g6.min.js
- jsDelivr: https://cdn.jsdelivr.net/npm/@antv/g6@beta/dist/g6.min.js
- npmmirror: https://registry.npmmirror.com/@antv/g6/beta/files/dist/g6.min.js
- cdnjs: https://cdnjs.cloudflare.com/ajax/libs/antv-g6/5.0.0-beta.34/g6.min.js
- unpkg: https://unpkg.com/@antv/g6@latest/dist/g6.min.js
- jsDelivr: https://cdn.jsdelivr.net/npm/@antv/g6@5/dist/g6.min.js
- npmmirror: https://registry.npmmirror.com/@antv/g6/5/files/dist/g6.min.js

使用 `script` 标签引入 G6:

```html
<script src="https://unpkg.com/@antv/g6@beta/dist/g6.min.js"></script>
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>
```

访问 [G6 CDN 示例](https://codesandbox.io/p/sandbox/using-g6-from-cdn-xt9ty6) 查看完整示例代码。
4 changes: 2 additions & 2 deletions packages/site/docs/manual/getting-started/quick-start.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Copy the following code into an HTML file and then open this file in a browser:
<div id="container" style="width: 500px; height: 500px"></div>

<!-- Import G6's JS file -->
<script src="https://unpkg.com/@antv/g6@beta/dist/g6.min.js"></script>
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>

<script>
fetch('https://assets.antv.antgroup.com/g6/graph.json')
Expand Down Expand Up @@ -66,7 +66,7 @@ Let's analyze the following code snippet:
2. Then, include the G6's JS file:

```html
<script src="https://unpkg.com/@antv/g6@beta/dist/g6.min.js"></script>
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>
```

3. Use the `fetch` method to obtain the graph's data:
Expand Down
4 changes: 2 additions & 2 deletions packages/site/docs/manual/getting-started/quick-start.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ order: 0
<div id="container" style="width: 500px; height: 500px"></div>

<!-- 引入 G6 的 JS 文件 -->
<script src="https://unpkg.com/@antv/g6@beta/dist/g6.min.js"></script>
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>

<script>
fetch('https://assets.antv.antgroup.com/g6/graph.json')
Expand Down Expand Up @@ -66,7 +66,7 @@ order: 0
2. 然后引入 G6 的 JS 文件:

```html
<script src="https://unpkg.com/@antv/g6@beta/dist/g6.min.js"></script>
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>
```

3. 使用 `fetch` 方法获取图的数据:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm init -y
Install G6:

```bash
npm install @antv/g6@beta --save
npm install @antv/g6 --save
```

Vite is a new type of front-end build tool that is based on ESModule and can quickly start up projects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm init -y
安装 G6:

```bash
npm install @antv/g6@beta --save
npm install @antv/g6 --save
```

Vite 是一个新型的前端构建工具,它基于 ESModule,可以快速启动项目。
Expand Down
Loading