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

feat: ⚡️ New site with new design #20

Merged
merged 75 commits into from
Oct 14, 2019
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
01db768
:zap: change header background
afc163 Sep 18, 2019
e7efda2
:zap: Add rc-footer
afc163 Sep 18, 2019
422d105
:up: upgrade rc-footer to 0.2.1
afc163 Sep 18, 2019
8f81ed5
:up: fix rc-upload ts error
afc163 Sep 18, 2019
e021689
:sparkles: footer data
afc163 Sep 19, 2019
b0f9b4e
:up: upgrade rc-footer
afc163 Sep 19, 2019
e1638c6
:up: upgrade rc-footer
afc163 Sep 23, 2019
96ff7e6
chore: :wrench: open site defaultly
afc163 Sep 23, 2019
b493386
chore(actions): :wrench: Automatic Rebase
afc163 Sep 25, 2019
3a9e962
:zap: Header!
afc163 Sep 25, 2019
c99217d
高亮样式
afc163 Sep 25, 2019
d268dbb
:white_check_mark: fix ci
afc163 Sep 25, 2019
893f115
Add products popover card
afc163 Sep 25, 2019
2320124
article content
afc163 Sep 25, 2019
50b82ae
render markdown page
afc163 Sep 25, 2019
a0d95e0
render md to docs menu
afc163 Sep 25, 2019
1d50765
fix active menu and order
afc163 Sep 25, 2019
f18a563
adding markdown style
afc163 Sep 25, 2019
e9e31df
read slug from dir path
afc163 Sep 26, 2019
609c78d
move documentation files
afc163 Sep 26, 2019
a9754c6
use slug over path
afc163 Sep 26, 2019
272cb73
use slug as menu key
afc163 Sep 27, 2019
598366a
:lipstick: format code
afc163 Sep 27, 2019
beed6e0
support SubMenu for documentations
afc163 Sep 27, 2019
8b1244e
defaultly expand all sub menu
afc163 Sep 27, 2019
e1a5e29
documents can be split to different folders
afc163 Sep 27, 2019
cf03598
localize the document menu title
afc163 Sep 27, 2019
cdadcb6
export docs from .antvisrc
afc163 Sep 27, 2019
e945178
fix location missing in ssr
afc163 Sep 27, 2019
c7a9659
update home and 404 pages
afc163 Sep 27, 2019
a489c6f
fix mixed content
afc163 Sep 27, 2019
d721516
highlight markdown code block
afc163 Sep 27, 2019
2ea692d
add gatsby-remark-autolink-headers
afc163 Sep 27, 2019
6009ba7
fix document category
afc163 Sep 27, 2019
8cde478
fix mixed content
afc163 Sep 27, 2019
d36639c
:globe_with_meridians: i18n docs support
afc163 Sep 29, 2019
4f68486
Add lang switcher
afc163 Sep 29, 2019
a09d9de
fix menu show and active
afc163 Sep 29, 2019
3b996e6
fix locale menu
afc163 Sep 29, 2019
6607298
fix document order
afc163 Sep 29, 2019
714c5f1
tweak header style
afc163 Sep 29, 2019
4de90fc
split products and product components
afc163 Sep 29, 2019
64a1344
fix mixed content
afc163 Sep 29, 2019
7e64f94
import react i18next
afc163 Sep 29, 2019
4b7eb33
Add libs in README.md
afc163 Sep 29, 2019
563baa5
:lipstick: format code
afc163 Sep 29, 2019
0e29cb4
remove Suspense for ssr
afc163 Sep 30, 2019
c06977a
Add remark plugins
afc163 Sep 30, 2019
cd25581
Add edit on GitHub button
afc163 Sep 30, 2019
286f3e6
fix SEO
afc163 Sep 30, 2019
dacb9a4
fix react-helmet ts error
afc163 Sep 30, 2019
235ea19
fix test case
afc163 Sep 30, 2019
18dcbed
Add toc for markdown doc
afc163 Sep 30, 2019
d55fbe4
support default chinese doc
afc163 Oct 9, 2019
02ba593
remove console log
afc163 Oct 9, 2019
209c519
i18n for reading time
afc163 Oct 9, 2019
70ce3d0
eng => English
afc163 Oct 9, 2019
491819d
default lang => zh
afc163 Oct 9, 2019
8eb5892
update site title
afc163 Oct 9, 2019
20cf162
Add padding for doc page
afc163 Oct 9, 2019
794fd65
devDependencies => dependencies
afc163 Oct 10, 2019
791bcf4
change name to @antv/gatsby-theme and publish
afc163 Oct 10, 2019
fa7d4d1
move .antvisrc.ts into siteMetadata
afc163 Oct 10, 2019
b863b16
fix test case
afc163 Oct 10, 2019
416690c
:zap: use @antv/gatsby-theme-antv !
afc163 Oct 12, 2019
b6af470
upgrade theme to 0.2.0
afc163 Oct 12, 2019
f8cc608
use build in ci
afc163 Oct 12, 2019
afd6ddd
add tsc in test case
afc163 Oct 12, 2019
49ff341
:up: upgrade @antv/gatsby-theme-antv to fix site build
afc163 Oct 12, 2019
b30700f
:memo: upgrade README.md
afc163 Oct 12, 2019
ba4a4d7
:bug: fix edit githubUrl
afc163 Oct 12, 2019
27dd931
:up: upgrade @antv/gatsby-theme-antv to 0.2.4
afc163 Oct 14, 2019
7679b01
:up: upgrade @antv/gatsby-theme-antv to 0.2.5
afc163 Oct 14, 2019
c9a6362
:up: upgrade @antv/gatsby-theme-antv to 0.2.6
afc163 Oct 14, 2019
8ecdae2
Add GATrackingId
afc163 Oct 14, 2019
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
14 changes: 14 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Automatic Rebase
uses: cirrus-actions/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ coverage
# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
Expand All @@ -29,7 +29,7 @@ bower_components
# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm install
npm start
```

Visit http://127.0.0.1:8000
Visit https://127.0.0.1:8000

## Prettier

Expand All @@ -38,5 +38,8 @@ Not ready.
## Used libraries

- [Gatsby](https://www.gatsbyjs.org/docs/)
- [Ant Design](https://github.com/ant-design/ant-design)
- [gatsby-transformer-remark](https://www.gatsbyjs.org/packages/gatsby-transformer-remark/)
- [Jest](https://jestjs.io/)
- [Testing Library](https://testing-library.com/)
- [react-i18next](https://react.i18next.com/)
6 changes: 6 additions & 0 deletions docs/other/category/test1.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章一
order: 0
---

content
6 changes: 6 additions & 0 deletions docs/other/category/test1.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章一
order: 0
---

内容。
6 changes: 6 additions & 0 deletions docs/other/category/test2.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章二
order: 1
---

content.
6 changes: 6 additions & 0 deletions docs/other/category/test2.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章二
order: 1
---

内容。
116 changes: 116 additions & 0 deletions docs/other/getting-started.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
title: Getting Started
order: 0
---

[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

![](https://img.shields.io/badge/language-javascript-red.svg)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

![](https://img.shields.io/badge/license-MIT-000000.svg)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


[![NPM Package](https://img.shields.io/npm/v/@antv/g2.svg)](https://www.npmjs.com/package/@antv/g2)
[![NPM Downloads](https://img.shields.io/npm/dm/@antv/g2.svg)](https://npmjs.org/package/@antv/g2)
[![Percentage of issues still open](https://isitmaintained.com/badge/open/antvis/g2.svg)](https://isitmaintained.com/project/antvis/g2 'Percentage of issues still open')

G2 is a visualization grammar, a data-driven visual language with a high level of usability and scalability. It provides a set of grammars, takes users beyond a limited set of charts to an almost unlimited world of graphical forms. With G2, users can describe the visual appearance of a visualization just by one statement.

**Special thanks to [Leland Wilkinson](https://en.wikipedia.org/wiki/Leland_Wilkinson), the author of [_The Grammar Of Graphics_](https://www.cs.uic.edu/~wilkinson/TheGrammarOfGraphics/GOG.html), whose book served as the foundation for G2.**

[More details about G2](https://antv.alipay.com/zh-cn/g2/3.x/index.html).

<img src="https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif" width="200"><img src="https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif" width="200"><img src="https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif" width="180"><img src="https://gw.alipayobjects.com/zos/rmsportal/ifSTXzrGbvtLRpnAvAiZ.gif" width="200">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


## Installation

```bash
$ npm install @antv/g2
```

### Usage

<img src="https://gw.alipayobjects.com/zos/rmsportal/aHvVgFiBnGzzKCEjdVtL.png" width="450">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


```html
<div id="c1"></div>
```

```js
import G2 from '@antv/g2';

const data = [
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 1150 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
];

const chart = new G2.Chart({
container: 'c1',
width: 500,
height: 500,
});

chart.source(data);
chart
.interval()
.position('genre*sold')
.color('genre');
chart.render();
```

[More examples](https://antv.alipay.com/zh-cn/g2/3.x/demo/index.html)

![demos](https://user-images.githubusercontent.com/1655789/34187141-d800fe94-e56a-11e7-878a-4dc0e4f538d9.png)

## Development

```bash
$ npm install

# run test case
$ npm run test-live

# build watching file changes and run demos
$ npm run dev

# run demos
$ npm run demos
```

## How to Contribute

Please let us know how can we help. Do check out [issues](https://github.com/antvis/g2/issues) for bug reports or suggestions first.

To become a contributor, please follow our [contributing guide](https://github.com/antvis/g2/blob/master/CONTRIBUTING.md).

## ~~Experience Improvement Program Description~~

~~In order to serve the users better, G2 will send the URL and version information back to the AntV server:~~

~~https://kcart.alipay.com/web/bi.do~~

~~**Except for URL and G2 version information, no other information will be collected.** You can also turn it off with the following code:~~

```js
// disable tracking
G2.track(false);
```

**update:**

**We decided to terminate the "Experience Improvement Program". In verson `@antv/g2@3.4.7` and above, all tracking code is removed, no unexpected remote request will be sent while you are using G2.**

<!-- GITCONTRIBUTOR_START -->

## Contributors

| [<img src="https://avatars1.githubusercontent.com/u/1655789?v=4" width="100px;"/><br/><sub><b>leungwensen</b></sub>](https://github.com/leungwensen)<br/> | [<img src="https://avatars3.githubusercontent.com/u/6628666?v=4" width="100px;"/><br/><sub><b>simaQ</b></sub>](https://github.com/simaQ)<br/> | [<img src="https://avatars1.githubusercontent.com/u/1264678?v=4" width="100px;"/><br/><sub><b>dxq613</b></sub>](https://github.com/dxq613)<br/> | [<img src="https://avatars3.githubusercontent.com/u/8325822?v=4" width="100px;"/><br/><sub><b>elaine1234</b></sub>](https://github.com/elaine1234)<br/> | [<img src="https://avatars0.githubusercontent.com/u/7098619?v=4" width="100px;"/><br/><sub><b>guisturdy</b></sub>](https://github.com/guisturdy)<br/> | [<img src="https://avatars3.githubusercontent.com/u/5888974?v=4" width="100px;"/><br/><sub><b>paleface001</b></sub>](https://github.com/paleface001)<br/> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| :---------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: |
| [<img src="https://avatars0.githubusercontent.com/u/8186664?v=4" width="100px;"/><br/><sub><b>chenshuai2144</b></sub>](https://github.com/chenshuai2144)<br/> | [<img src="https://avatars3.githubusercontent.com/u/6111424?v=4" width="100px;"/><br/><sub><b>xile611</b></sub>](https://github.com/xile611)<br/> | [<img src="https://avatars3.githubusercontent.com/u/5591805?v=4" width="100px;"/><br/><sub><b>maplor</b></sub>](https://github.com/maplor)<br/> | [<img src="https://avatars3.githubusercontent.com/u/6560377?v=4" width="100px;"/><br/><sub><b>zhfanrui</b></sub>](https://github.com/zhfanrui)<br/> | [<img src="https://avatars2.githubusercontent.com/u/6942296?v=4" width="100px;"/><br/><sub><b>Frezc</b></sub>](https://github.com/Frezc)<br/> | [<img src="https://avatars1.githubusercontent.com/u/6812138?v=4" width="100px;"/><br/><sub><b>Leannechn</b></sub>](https://github.com/Leannechn)<br/> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| [<img src="https://avatars2.githubusercontent.com/u/1451480?v=4" width="100px;"/><br/><sub><b>janjakubnanista</b></sub>](https://github.com/janjakubnanista)<br/> | [<img src="https://avatars1.githubusercontent.com/u/11624840?v=4" width="100px;"/><br/><sub><b>ParryQiu</b></sub>](https://github.com/ParryQiu)<br/> | [<img src="https://avatars3.githubusercontent.com/u/22516098?v=4" width="100px;"/><br/><sub><b>Sai0514</b></sub>](https://github.com/Sai0514)<br/> | [<img src="https://avatars0.githubusercontent.com/u/9816225?v=4" width="100px;"/><br/><sub><b>liximomo</b></sub>](https://github.com/liximomo)<br/> | [<img src="https://avatars1.githubusercontent.com/u/9054130?v=4" width="100px;"/><br/><sub><b>wensen-lws</b></sub>](https://github.com/wensen-lws)<br/> | [<img src="https://avatars1.githubusercontent.com/u/1011681?v=4" width="100px;"/><br/><sub><b>xudafeng</b></sub>](https://github.com/xudafeng)<br/> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| [<img src="https://avatars1.githubusercontent.com/u/2370929?v=4" width="100px;"/><br/><sub><b>wangyu-kelly</b></sub>](https://github.com/wangyu-kelly)<br/> | [<img src="https://avatars0.githubusercontent.com/u/9314735?v=4" width="100px;"/><br/><sub><b>BlackGanglion</b></sub>](https://github.com/BlackGanglion)<br/> | [<img src="https://avatars3.githubusercontent.com/u/210810?v=4" width="100px;"/><br/><sub><b>illumen</b></sub>](https://github.com/illumen)<br/> | [<img src="https://avatars1.githubusercontent.com/u/827205?v=4" width="100px;"/><br/><sub><b>DanielRuf</b></sub>](https://github.com/DanielRuf)<br/> | [<img src="https://avatars2.githubusercontent.com/u/5518?v=4" width="100px;"/><br/><sub><b>huacnlee</b></sub>](https://github.com/huacnlee)<br/> | [<img src="https://avatars2.githubusercontent.com/u/13056641?v=4" width="100px;"/><br/><sub><b>0nza1101</b></sub>](https://github.com/0nza1101)<br/> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| [<img src="https://avatars2.githubusercontent.com/u/566097?v=4" width="100px;"/><br/><sub><b>RaoHai</b></sub>](https://github.com/RaoHai)<br/> | [<img src="https://avatars0.githubusercontent.com/u/8731922?v=4" width="100px;"/><br/><sub><b>tbroadley</b></sub>](https://github.com/tbroadley)<br/> | [<img src="https://avatars2.githubusercontent.com/u/1860329?v=4" width="100px;"/><br/><sub><b>charleyw</b></sub>](https://github.com/charleyw)<br/> | [<img src="https://avatars0.githubusercontent.com/u/21355783?v=4" width="100px;"/><br/><sub><b>Hazyzh</b></sub>](https://github.com/Hazyzh)<br/> | [<img src="https://avatars0.githubusercontent.com/u/6947976?v=4" width="100px;"/><br/><sub><b>forbreak</b></sub>](https://github.com/forbreak)<br/> | [<img src="https://avatars0.githubusercontent.com/u/4783781?v=4" width="100px;"/><br/><sub><b>nekocode</b></sub>](https://github.com/nekocode)<br/> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Jul 27 2019 14:06:08 GMT+0800`.

<!-- GITCONTRIBUTOR_END -->
117 changes: 117 additions & 0 deletions docs/other/getting-started.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
title: 其他文档
order: 0
---

[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

![](https://img.shields.io/badge/language-javascript-red.svg)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

![](https://img.shields.io/badge/license-MIT-000000.svg)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


[![NPM Package](https://img.shields.io/npm/v/@antv/g2.svg)](https://www.npmjs.com/package/@antv/g2)
[![NPM Downloads](https://img.shields.io/npm/dm/@antv/g2.svg)](https://npmjs.org/package/@antv/g2)
[![Percentage of issues still open](https://isitmaintained.com/badge/open/antvis/g2.svg)](https://isitmaintained.com/project/antvis/g2 'Percentage of issues still open')

G2 是一套基于可视化编码的图形语法,以数据驱动,具有高度的易用性和扩展性,用户无需关注各种繁琐的实现细节,一条语句即可构建出各种各样的可交互的统计图表。

**在此衷心感谢[《The Grammar of Graphics》](https://www.cs.uic.edu/~wilkinson/TheGrammarOfGraphics/GOG.html)的作者 [Leland Wilkinson](https://en.wikipedia.org/wiki/Leland_Wilkinson),为 G2 的图形语法提供了理论基础!**

[了解更多 G2 详情](https://antv.alipay.com/zh-cn/g2/3.x/index.html).

<img src="https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif" width="200"><img src="https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif" width="200"><img src="https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif" width="180"><img src="https://gw.alipayobjects.com/zos/rmsportal/ifSTXzrGbvtLRpnAvAiZ.gif" width="200">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


## 安装

```bash
npm install @antv/g2
```

## 特性

- ✔︎ 简单、易用
- ✔︎ 完备的可视化编码
- ✔︎ 强大的扩展能力

## 文档

- [使用教程](https://antv.alipay.com/zh-cn/g2/3.x/tutorial/index.html)
- [API 文档](https://antv.alipay.com/zh-cn/g2/3.x/api/index.html)
- [图表示例](https://antv.alipay.com/zh-cn/g2/3.x/demo/index.html)

### 快速开始

<img src="https://gw.alipayobjects.com/zos/rmsportal/aHvVgFiBnGzzKCEjdVtL.png" width="450">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


```html
<div id="c1"></div>
```

```js
import G2 from '@antv/g2';

const data = [
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 1150 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
];

const chart = new G2.Chart({
container: 'c1',
width: 500,
height: 500,
});

chart.source(data);
chart
.interval()
.position('genre*sold') // highlight-line
.color('genre');
chart.render();
```

[更多示例](https://antv.alipay.com/zh-cn/g2/3.x/demo/index.html)

![demos](https://user-images.githubusercontent.com/1655789/34187141-d800fe94-e56a-11e7-878a-4dc0e4f538d9.png)

## 本地开发

```bash
$ npm install

# 跑测试用例
$ npm run test-live

# 监听文件变化构建,并打开 demo 页面
$ npm run dev

# 打开 demo
$ npm run demos
```

## ~~体验改进计划说明~~

~~为了更好服务用户,G2 会将 URL 和版本信息发送回 AntV 服务器:~~

~~https://kcart.alipay.com/web/bi.do~~

~~**除了 URL 与 G2 版本信息外,不会收集任何其他信息**,一切为了能对 G2 的运行情况有更多了解,以更好服务于用户。如有担心,可以通过下面的代码关闭:~~

```js
// 关闭 G2 的体验改进计划打点请求
G2.track(false);
```

**更新**

**我们已决定终止体验改进计划**

**从 `@antv/g2@3.4.7` 版本开始,所有打点代码已被移除。后续版本的 G2 不会再发送任何远程请求**

## 如何贡献

如果您在使用的过程中碰到问题,可以先通过 [issues](https://github.com/antvis/g2/issues) 看看有没有类似的 bug 或者建议。

如需提交代码,请遵从我们的[贡献指南](https://github.com/antvis/g2/blob/master/CONTRIBUTING.md)。

I can highlight `css±.some-class { background-color: red }` with CSS syntax.
6 changes: 6 additions & 0 deletions docs/specification/category/test1.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章一
order: 0
---

content
6 changes: 6 additions & 0 deletions docs/specification/category/test1.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章一
order: 0
---

内容。
6 changes: 6 additions & 0 deletions docs/specification/category/test2.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章二
order: 1
---

content.
6 changes: 6 additions & 0 deletions docs/specification/category/test2.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 分类测试文章二
order: 1
---

内容。
Loading