diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index d1b746769..ad164315c 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -4,18 +4,18 @@ on: [push]
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
- - name: Use Node.js 10.x
- uses: actions/setup-node@v1
- with:
- node-version: 10.x
- - name: npm install, and test
- run: |
- npm install
- npm test
- env:
- CI: true
+ - uses: actions/checkout@v1
+ - name: Use Node.js 10.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 10.x
+ - name: npm install, and build
+ run: |
+ npm install
+ npm run tsc
+ npm run build
+ env:
+ CI: true
diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml
new file mode 100644
index 000000000..8b1b97436
--- /dev/null
+++ b/.github/workflows/rebase.yml
@@ -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 }}
diff --git a/.gitignore b/.gitignore
index e86fe2555..9f6608aec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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/)
@@ -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
diff --git a/README.md b/README.md
index 8a7a132d5..13ef62cd7 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,20 @@
# AntV New Site 📈
+New AntV site built on [@antv/gatsby-theme-antv](https://github.com/antvis/gatsby-theme-antv).
+
![CI status](https://github.com/antvis/antvis.github.io/workflows/Node%20CI/badge.svg)
[![Dependency Status](https://david-dm.org/antvis/antvis.github.io.svg?style=flat-square)](https://david-dm.org/antvis/antvis.github.io)
[![devDependencies Status](https://david-dm.org/antvis/antvis.github.io/dev-status.svg)](https://david-dm.org/antvis/antvis.github.io?type=dev)
![prettier code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)
-## Install
+## Install & Preview
```bash
npm install
-```
-
-## Preview
-
-```bash
npm start
```
-Visit http://127.0.0.1:8000
+Visit https://127.0.0.1:8000
## Prettier
@@ -25,18 +22,6 @@ Visit http://127.0.0.1:8000
npm run format
```
-## Test
-
-```bash
-npm test
-```
-
## Deploy
Not ready.
-
-## Used libraries
-
-- [Gatsby](https://www.gatsbyjs.org/docs/)
-- [Jest](https://jestjs.io/)
-- [Testing Library](https://testing-library.com/)
diff --git a/__mocks__/file-mock.js b/__mocks__/file-mock.js
deleted file mode 100644
index 4c19aaf3a..000000000
--- a/__mocks__/file-mock.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = `test-file-stub`;
diff --git a/__mocks__/gatsby.js b/__mocks__/gatsby.js
deleted file mode 100644
index 4fd93e0aa..000000000
--- a/__mocks__/gatsby.js
+++ /dev/null
@@ -1,14 +0,0 @@
-const React = require(`react`);
-const gatsby = jest.requireActual(`gatsby`);
-
-module.exports = {
- ...gatsby,
- graphql: jest.fn(),
- Link: jest.fn().mockImplementation(({ to, ...rest }) =>
- React.createElement(`a`, {
- ...rest,
- href: to,
- }),
- ),
- useStaticQuery: jest.fn(),
-};
diff --git a/docs/other/category/test1.en.md b/docs/other/category/test1.en.md
new file mode 100644
index 000000000..56947c427
--- /dev/null
+++ b/docs/other/category/test1.en.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章一
+order: 0
+---
+
+content
diff --git a/docs/other/category/test1.zh.md b/docs/other/category/test1.zh.md
new file mode 100644
index 000000000..b56d26ade
--- /dev/null
+++ b/docs/other/category/test1.zh.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章一
+order: 0
+---
+
+内容。
diff --git a/docs/other/category/test2.en.md b/docs/other/category/test2.en.md
new file mode 100644
index 000000000..c35456ad4
--- /dev/null
+++ b/docs/other/category/test2.en.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章二
+order: 1
+---
+
+content.
diff --git a/docs/other/category/test2.zh.md b/docs/other/category/test2.zh.md
new file mode 100644
index 000000000..6482796a7
--- /dev/null
+++ b/docs/other/category/test2.zh.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章二
+order: 1
+---
+
+内容。
diff --git a/docs/other/getting-started.en.md b/docs/other/getting-started.en.md
new file mode 100644
index 000000000..835eb573d
--- /dev/null
+++ b/docs/other/getting-started.en.md
@@ -0,0 +1,116 @@
+---
+title: Getting Started
+order: 0
+---
+
+[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
+![](https://img.shields.io/badge/language-javascript-red.svg)
+![](https://img.shields.io/badge/license-MIT-000000.svg)
+
+[![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).
+
+![](https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif)
+
+## Installation
+
+```bash
+$ npm install @antv/g2
+```
+
+### Usage
+
+
+
+```html
+
+```
+
+```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.**
+
+
+
+## Contributors
+
+| [![](https://avatars1.githubusercontent.com/u/1655789?v=4)
leungwensen](https://github.com/leungwensen)
| [![](https://avatars3.githubusercontent.com/u/6628666?v=4)
simaQ](https://github.com/simaQ)
| [![](https://avatars1.githubusercontent.com/u/1264678?v=4)
dxq613](https://github.com/dxq613)
| [![](https://avatars3.githubusercontent.com/u/8325822?v=4)
elaine1234](https://github.com/elaine1234)
| [![](https://avatars0.githubusercontent.com/u/7098619?v=4)
guisturdy](https://github.com/guisturdy)
| [![](https://avatars3.githubusercontent.com/u/5888974?v=4)
paleface001](https://github.com/paleface001)
|
+| :---------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: |
+| [![](https://avatars0.githubusercontent.com/u/8186664?v=4)
chenshuai2144](https://github.com/chenshuai2144)
| [![](https://avatars3.githubusercontent.com/u/6111424?v=4)
xile611](https://github.com/xile611)
| [![](https://avatars3.githubusercontent.com/u/5591805?v=4)
maplor](https://github.com/maplor)
| [![](https://avatars3.githubusercontent.com/u/6560377?v=4)
zhfanrui](https://github.com/zhfanrui)
| [![](https://avatars2.githubusercontent.com/u/6942296?v=4)
Frezc](https://github.com/Frezc)
| [![](https://avatars1.githubusercontent.com/u/6812138?v=4)
Leannechn](https://github.com/Leannechn)
|
+| [![](https://avatars2.githubusercontent.com/u/1451480?v=4)
janjakubnanista](https://github.com/janjakubnanista)
| [![](https://avatars1.githubusercontent.com/u/11624840?v=4)
ParryQiu](https://github.com/ParryQiu)
| [![](https://avatars3.githubusercontent.com/u/22516098?v=4)
Sai0514](https://github.com/Sai0514)
| [![](https://avatars0.githubusercontent.com/u/9816225?v=4)
liximomo](https://github.com/liximomo)
| [![](https://avatars1.githubusercontent.com/u/9054130?v=4)
wensen-lws](https://github.com/wensen-lws)
| [![](https://avatars1.githubusercontent.com/u/1011681?v=4)
xudafeng](https://github.com/xudafeng)
|
+| [![](https://avatars1.githubusercontent.com/u/2370929?v=4)
wangyu-kelly](https://github.com/wangyu-kelly)
| [![](https://avatars0.githubusercontent.com/u/9314735?v=4)
BlackGanglion](https://github.com/BlackGanglion)
| [![](https://avatars3.githubusercontent.com/u/210810?v=4)
illumen](https://github.com/illumen)
| [![](https://avatars1.githubusercontent.com/u/827205?v=4)
DanielRuf](https://github.com/DanielRuf)
| [![](https://avatars2.githubusercontent.com/u/5518?v=4)
huacnlee](https://github.com/huacnlee)
| [![](https://avatars2.githubusercontent.com/u/13056641?v=4)
0nza1101](https://github.com/0nza1101)
|
+| [![](https://avatars2.githubusercontent.com/u/566097?v=4)
RaoHai](https://github.com/RaoHai)
| [![](https://avatars0.githubusercontent.com/u/8731922?v=4)
tbroadley](https://github.com/tbroadley)
| [![](https://avatars2.githubusercontent.com/u/1860329?v=4)
charleyw](https://github.com/charleyw)
| [![](https://avatars0.githubusercontent.com/u/21355783?v=4)
Hazyzh](https://github.com/Hazyzh)
| [![](https://avatars0.githubusercontent.com/u/6947976?v=4)
forbreak](https://github.com/forbreak)
| [![](https://avatars0.githubusercontent.com/u/4783781?v=4)
nekocode](https://github.com/nekocode)
|
+
+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`.
+
+
diff --git a/docs/other/getting-started.zh.md b/docs/other/getting-started.zh.md
new file mode 100644
index 000000000..6aae65366
--- /dev/null
+++ b/docs/other/getting-started.zh.md
@@ -0,0 +1,117 @@
+---
+title: 其他文档
+order: 0
+---
+
+[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
+![](https://img.shields.io/badge/language-javascript-red.svg)
+![](https://img.shields.io/badge/license-MIT-000000.svg)
+
+[![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).
+
+![](https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif)
+
+## 安装
+
+```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)
+
+### 快速开始
+
+
+
+```html
+
+```
+
+```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.
diff --git a/docs/specification/category/test1.en.md b/docs/specification/category/test1.en.md
new file mode 100644
index 000000000..56947c427
--- /dev/null
+++ b/docs/specification/category/test1.en.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章一
+order: 0
+---
+
+content
diff --git a/docs/specification/category/test1.zh.md b/docs/specification/category/test1.zh.md
new file mode 100644
index 000000000..b56d26ade
--- /dev/null
+++ b/docs/specification/category/test1.zh.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章一
+order: 0
+---
+
+内容。
diff --git a/docs/specification/category/test2.en.md b/docs/specification/category/test2.en.md
new file mode 100644
index 000000000..c35456ad4
--- /dev/null
+++ b/docs/specification/category/test2.en.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章二
+order: 1
+---
+
+content.
diff --git a/docs/specification/category/test2.zh.md b/docs/specification/category/test2.zh.md
new file mode 100644
index 000000000..6482796a7
--- /dev/null
+++ b/docs/specification/category/test2.zh.md
@@ -0,0 +1,6 @@
+---
+title: 分类测试文章二
+order: 1
+---
+
+内容。
diff --git a/docs/specification/getting-started.en.md b/docs/specification/getting-started.en.md
new file mode 100644
index 000000000..835eb573d
--- /dev/null
+++ b/docs/specification/getting-started.en.md
@@ -0,0 +1,116 @@
+---
+title: Getting Started
+order: 0
+---
+
+[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
+![](https://img.shields.io/badge/language-javascript-red.svg)
+![](https://img.shields.io/badge/license-MIT-000000.svg)
+
+[![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).
+
+![](https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif)
+
+## Installation
+
+```bash
+$ npm install @antv/g2
+```
+
+### Usage
+
+
+
+```html
+
+```
+
+```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.**
+
+
+
+## Contributors
+
+| [![](https://avatars1.githubusercontent.com/u/1655789?v=4)
leungwensen](https://github.com/leungwensen)
| [![](https://avatars3.githubusercontent.com/u/6628666?v=4)
simaQ](https://github.com/simaQ)
| [![](https://avatars1.githubusercontent.com/u/1264678?v=4)
dxq613](https://github.com/dxq613)
| [![](https://avatars3.githubusercontent.com/u/8325822?v=4)
elaine1234](https://github.com/elaine1234)
| [![](https://avatars0.githubusercontent.com/u/7098619?v=4)
guisturdy](https://github.com/guisturdy)
| [![](https://avatars3.githubusercontent.com/u/5888974?v=4)
paleface001](https://github.com/paleface001)
|
+| :---------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: |
+| [![](https://avatars0.githubusercontent.com/u/8186664?v=4)
chenshuai2144](https://github.com/chenshuai2144)
| [![](https://avatars3.githubusercontent.com/u/6111424?v=4)
xile611](https://github.com/xile611)
| [![](https://avatars3.githubusercontent.com/u/5591805?v=4)
maplor](https://github.com/maplor)
| [![](https://avatars3.githubusercontent.com/u/6560377?v=4)
zhfanrui](https://github.com/zhfanrui)
| [![](https://avatars2.githubusercontent.com/u/6942296?v=4)
Frezc](https://github.com/Frezc)
| [![](https://avatars1.githubusercontent.com/u/6812138?v=4)
Leannechn](https://github.com/Leannechn)
|
+| [![](https://avatars2.githubusercontent.com/u/1451480?v=4)
janjakubnanista](https://github.com/janjakubnanista)
| [![](https://avatars1.githubusercontent.com/u/11624840?v=4)
ParryQiu](https://github.com/ParryQiu)
| [![](https://avatars3.githubusercontent.com/u/22516098?v=4)
Sai0514](https://github.com/Sai0514)
| [![](https://avatars0.githubusercontent.com/u/9816225?v=4)
liximomo](https://github.com/liximomo)
| [![](https://avatars1.githubusercontent.com/u/9054130?v=4)
wensen-lws](https://github.com/wensen-lws)
| [![](https://avatars1.githubusercontent.com/u/1011681?v=4)
xudafeng](https://github.com/xudafeng)
|
+| [![](https://avatars1.githubusercontent.com/u/2370929?v=4)
wangyu-kelly](https://github.com/wangyu-kelly)
| [![](https://avatars0.githubusercontent.com/u/9314735?v=4)
BlackGanglion](https://github.com/BlackGanglion)
| [![](https://avatars3.githubusercontent.com/u/210810?v=4)
illumen](https://github.com/illumen)
| [![](https://avatars1.githubusercontent.com/u/827205?v=4)
DanielRuf](https://github.com/DanielRuf)
| [![](https://avatars2.githubusercontent.com/u/5518?v=4)
huacnlee](https://github.com/huacnlee)
| [![](https://avatars2.githubusercontent.com/u/13056641?v=4)
0nza1101](https://github.com/0nza1101)
|
+| [![](https://avatars2.githubusercontent.com/u/566097?v=4)
RaoHai](https://github.com/RaoHai)
| [![](https://avatars0.githubusercontent.com/u/8731922?v=4)
tbroadley](https://github.com/tbroadley)
| [![](https://avatars2.githubusercontent.com/u/1860329?v=4)
charleyw](https://github.com/charleyw)
| [![](https://avatars0.githubusercontent.com/u/21355783?v=4)
Hazyzh](https://github.com/Hazyzh)
| [![](https://avatars0.githubusercontent.com/u/6947976?v=4)
forbreak](https://github.com/forbreak)
| [![](https://avatars0.githubusercontent.com/u/4783781?v=4)
nekocode](https://github.com/nekocode)
|
+
+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`.
+
+
diff --git a/docs/specification/getting-started.zh.md b/docs/specification/getting-started.zh.md
new file mode 100644
index 000000000..7d2c1c7ee
--- /dev/null
+++ b/docs/specification/getting-started.zh.md
@@ -0,0 +1,117 @@
+---
+title: 开始使用
+order: 0
+---
+
+[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
+![](https://img.shields.io/badge/language-javascript-red.svg)
+![](https://img.shields.io/badge/license-MIT-000000.svg)
+
+[![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).
+
+![](https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif)
+
+## 安装
+
+```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)
+
+### 快速开始
+
+
+
+```html
+
+```
+
+```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.
diff --git a/docs/specification/test-only-cn.md b/docs/specification/test-only-cn.md
new file mode 100644
index 000000000..079070ba0
--- /dev/null
+++ b/docs/specification/test-only-cn.md
@@ -0,0 +1,117 @@
+---
+title: 测试只有中文
+order: 3
+---
+
+[![](https://img.shields.io/travis/antvis/g2.svg)](https://travis-ci.org/antvis/g2)
+![](https://img.shields.io/badge/language-javascript-red.svg)
+![](https://img.shields.io/badge/license-MIT-000000.svg)
+
+[![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).
+
+![](https://gw.alipayobjects.com/zos/rmsportal/AOwgKIjknXfggPijmhym.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/nfiOREzMIsENrzUeLOGR.gif)
![](https://gw.alipayobjects.com/zos/rmsportal/uZZmaudtKRnvUhmUdZSZ.gif)
+
+## 安装
+
+```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)
+
+### 快速开始
+
+
+
+```html
+
+```
+
+```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.
diff --git a/gatsby-browser.js b/gatsby-browser.js
index b1e5c316b..fbf4f2179 100644
--- a/gatsby-browser.js
+++ b/gatsby-browser.js
@@ -1,7 +1,4 @@
-/**
- * Implement Gatsby's Browser APIs in this file.
- *
- * See: https://www.gatsbyjs.org/docs/browser-apis/
- */
+import i18n from 'i18next';
+import locale from './site/locale.json';
-// You can delete this file if you're not using it
+i18n.addResources('en', 'translation', locale.en.translation);
diff --git a/gatsby-config.js b/gatsby-config.js
index 6e07b3362..c6042826b 100644
--- a/gatsby-config.js
+++ b/gatsby-config.js
@@ -1,54 +1,58 @@
+const { homepage, repository } = require('./package.json');
+
module.exports = {
- siteMetadata: {
- title: `AntV`,
- siteUrl: `https://antvis.github.io`,
- description: `Ant Visualization solution home page`,
- },
plugins: [
- `gatsby-plugin-react-helmet`,
{
- resolve: `gatsby-source-filesystem`,
+ resolve: `@antv/gatsby-theme-antv`,
options: {
- name: `images`,
- path: `${__dirname}/src/images`,
+ GATrackingId: 'UA-148148901-1',
},
},
- `gatsby-transformer-sharp`,
- `gatsby-plugin-sharp`,
- `gatsby-plugin-offline`,
- {
- resolve: `gatsby-plugin-manifest`,
- options: {
- name: `gatsby-starter-default`,
- short_name: `starter`,
- start_url: `/`,
- background_color: `#663399`,
- theme_color: `#663399`,
- display: `minimal-ui`,
- icon: `src/images/favicon.png`, // This path is relative to the root of the site.
- },
+ ],
+ siteMetadata: {
+ title: `AntV`,
+ description: `Ant Visualization solution home page`,
+ siteUrl: homepage,
+ githubUrl: repository.url,
+ languages: {
+ langs: ['en', 'zh'],
+ defaultLangKey: 'zh',
},
- `gatsby-plugin-typescript`,
- {
- resolve: 'gatsby-plugin-less',
- options: {
- javascriptEnabled: true,
+ docs: [
+ {
+ slug: 'specification',
+ title: {
+ zh: '设计语言',
+ en: 'Specification',
+ },
+ order: 0,
+ redirect: 'getting-started',
},
- },
- {
- resolve: 'gatsby-plugin-antd',
- options: {
- style: true,
+ {
+ slug: 'specification/category',
+ title: {
+ zh: '分类一',
+ en: 'category1',
+ },
+ order: 1,
},
- },
- {
- resolve: `gatsby-plugin-google-analytics`,
- options: {
- trackingId: `UA-148148901-1`,
+ {
+ slug: 'other',
+ title: {
+ zh: '其他文档',
+ en: 'other',
+ },
+ order: 0,
+ redirect: 'getting-started',
},
- },
- // this (optional) plugin enables Progressive Web App + Offline functionality
- // To learn more, visit: https://gatsby.dev/offline
- // `gatsby-plugin-offline`,
- ],
+ {
+ slug: 'other/category',
+ title: {
+ zh: '分类二',
+ en: 'category2',
+ },
+ order: 2,
+ },
+ ],
+ },
};
diff --git a/gatsby-node.js b/gatsby-node.js
deleted file mode 100644
index 2f4266513..000000000
--- a/gatsby-node.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Implement Gatsby's Node APIs in this file.
- *
- * See: https://www.gatsbyjs.org/docs/node-apis/
- */
-
-// You can delete this file if you're not using it
diff --git a/gatsby-ssr.js b/gatsby-ssr.js
deleted file mode 100644
index b17b8fc19..000000000
--- a/gatsby-ssr.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
- *
- * See: https://www.gatsbyjs.org/docs/ssr-apis/
- */
-
-// You can delete this file if you're not using it
diff --git a/jest-preprocess.js b/jest-preprocess.js
deleted file mode 100644
index 732206994..000000000
--- a/jest-preprocess.js
+++ /dev/null
@@ -1,4 +0,0 @@
-const babelOptions = {
- presets: ['babel-preset-gatsby'],
-};
-module.exports = require('babel-jest').createTransformer(babelOptions);
diff --git a/jest.config.js b/jest.config.js
deleted file mode 100644
index 3ce12ba0a..000000000
--- a/jest.config.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = {
- transform: {
- '^.+\\.tsx?$': 'ts-jest',
- '^.+\\.jsx?$': `/jest-preprocess.js`,
- },
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
- moduleNameMapper: {
- '.+\\.(css|styl|less|sass|scss)$': `identity-obj-proxy`,
- '.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `/__mocks__/file-mock.js`,
- },
- testPathIgnorePatterns: [`node_modules`, `.cache`],
- transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`],
- globals: {
- __PATH_PREFIX__: ``,
- },
- testURL: `http://localhost`,
- setupFilesAfterEnv: [`/jest.setup.js`],
- setupFiles: [`/loadershim.js`],
-};
diff --git a/jest.setup.js b/jest.setup.js
deleted file mode 100644
index 6347c75af..000000000
--- a/jest.setup.js
+++ /dev/null
@@ -1 +0,0 @@
-require(`@testing-library/jest-dom/extend-expect`);
diff --git a/loadershim.js b/loadershim.js
deleted file mode 100644
index 530bd30b3..000000000
--- a/loadershim.js
+++ /dev/null
@@ -1,3 +0,0 @@
-global.___loader = {
- enqueue: jest.fn(),
-};
diff --git a/package.json b/package.json
index a9e30fd4b..feef01a26 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
- "name": "@antv/website",
+ "name": "antv.alipay.com",
+ "private": true,
"description": "Ant Visualization solution home page",
"version": "0.1.0",
"author": "AntV Team ",
@@ -16,45 +17,33 @@
"bugs": {
"url": "https://github.com/antvis/antvis.github.io/issues"
},
- "devDependencies": {
- "gatsby": "^2.15.16",
- "gatsby-image": "^2.2.19",
- "gatsby-plugin-antd": "^2.0.2",
- "gatsby-plugin-google-analytics": "^2.1.16",
- "gatsby-plugin-less": "^3.0.6",
- "gatsby-plugin-manifest": "^2.2.16",
- "gatsby-plugin-offline": "^3.0.7",
- "gatsby-plugin-react-helmet": "^3.1.7",
- "gatsby-plugin-sharp": "^2.2.22",
- "gatsby-plugin-typescript": "^2.1.8",
- "gatsby-source-filesystem": "^2.1.22",
- "gatsby-transformer-sharp": "^2.2.14",
- "less": "^3.10.3",
+ "dependencies": {
+ "@antv/gatsby-theme-antv": "^0.2.6",
+ "@types/react": "^16.9.5",
+ "@types/react-dom": "^16.9.1",
+ "antd": "^3.23.6",
+ "gatsby": "^2.15.36",
+ "husky": "^3.0.8",
+ "i18next": "^17.2.0",
"prettier": "^1.18.2",
- "react": "^16.9.0",
- "react-dom": "^16.9.0",
- "react-helmet": "^5.2.1",
- "@testing-library/jest-dom": "^4.1.0",
- "@testing-library/react": "^9.1.4",
- "@types/jest": "^24.0.18",
- "@types/react": "^16.9.2",
- "@types/react-dom": "^16.9.0",
- "@types/react-helmet": "^5.0.10",
- "babel-jest": "^24.9.0",
- "babel-preset-gatsby": "^0.2.13",
- "identity-obj-proxy": "^3.0.0",
- "jest": "^24.9.0",
- "react-test-renderer": "^16.9.0",
- "ts-jest": "^24.1.0",
- "typescript": "^3.6.3"
+ "pretty-quick": "^1.11.0",
+ "react": "^16.10.2",
+ "react-dom": "^16.10.2",
+ "react-i18next": "^10.13.1",
+ "typescript": "^3.6.4"
},
"license": "MIT",
"scripts": {
- "build": "gatsby build",
- "develop": "gatsby develop",
- "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"start": "npm run develop",
- "serve": "gatsby serve",
- "test": "jest"
+ "build": "gatsby build",
+ "develop": "gatsby develop --open",
+ "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md,less}\"",
+ "tsc": "tsc",
+ "serve": "gatsby serve"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "pretty-quick --staged"
+ }
}
}
diff --git a/site/externals.d.ts b/site/externals.d.ts
new file mode 100644
index 000000000..75da982de
--- /dev/null
+++ b/site/externals.d.ts
@@ -0,0 +1,2 @@
+declare module '*.less';
+declare module '*.png';
diff --git a/src/images/gatsby-astronaut.png b/site/images/gatsby-astronaut.png
similarity index 100%
rename from src/images/gatsby-astronaut.png
rename to site/images/gatsby-astronaut.png
diff --git a/site/locale.json b/site/locale.json
new file mode 100644
index 000000000..89ad092bc
--- /dev/null
+++ b/site/locale.json
@@ -0,0 +1,7 @@
+{
+ "en": {
+ "translation": {
+ "首页": "Home Page"
+ }
+ }
+}
diff --git a/site/pages/index.en.tsx b/site/pages/index.en.tsx
new file mode 100644
index 000000000..4f2095ca1
--- /dev/null
+++ b/site/pages/index.en.tsx
@@ -0,0 +1,3 @@
+import Index from './index.zh';
+
+export default Index;
diff --git a/site/pages/index.zh.tsx b/site/pages/index.zh.tsx
new file mode 100644
index 000000000..4fd640bfb
--- /dev/null
+++ b/site/pages/index.zh.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import { Skeleton } from 'antd';
+import { useTranslation } from 'react-i18next';
+import SEO from '@antv/gatsby-theme-antv/site/components/seo';
+import astronaut from '../images/gatsby-astronaut.png';
+
+const IndexPage = () => {
+ const { t } = useTranslation();
+ return (
+ <>
+
+
+ {t('首页')}
+
![astronaut]({astronaut})
+
+
+
+
+
+ >
+ );
+};
+
+export default IndexPage;
diff --git a/src/components/__tests__/header.test.js b/src/components/__tests__/header.test.js
deleted file mode 100644
index f16812c0a..000000000
--- a/src/components/__tests__/header.test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from 'react';
-import { render } from '@testing-library/react';
-
-import Header from '../header';
-
-describe(`Header`, () => {
- it(`renders siteTitle`, () => {
- const siteTitle = `Hello World`;
- const { getByText } = render();
-
- const title = getByText(siteTitle);
-
- expect(title).toBeInTheDocument();
- });
-});
diff --git a/src/components/__tests__/layout.test.js b/src/components/__tests__/layout.test.js
deleted file mode 100644
index f596c4273..000000000
--- a/src/components/__tests__/layout.test.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import React from 'react';
-import { render } from '@testing-library/react';
-import { useStaticQuery } from 'gatsby'; // mocked
-
-import Layout from '../layout';
-
-beforeEach(() => {
- useStaticQuery.mockImplementationOnce(() => ({
- site: {
- siteMetadata: {
- title: `GatsbyJS`,
- },
- },
- }));
-});
-
-describe(`Layout`, () => {
- it(`renders a header`, () => {
- const { container } = render(
-
-
- hello
-
- ,
- );
-
- expect(container.querySelector(`header`)).toBeInTheDocument();
- });
-
- it(`renders children`, () => {
- const text = `__Hello world__`;
- const { getByText } = render(
-
-
- {text}
-
- ,
- );
-
- const child = getByText(text);
-
- expect(child).toBeInTheDocument();
- });
-});
diff --git a/src/components/header.tsx b/src/components/header.tsx
deleted file mode 100644
index 47132f430..000000000
--- a/src/components/header.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Link } from 'gatsby';
-import React from 'react';
-
-interface HeaderProps {
- siteTitle?: string;
-}
-
-const Header: React.FC = ({ siteTitle }) => (
-
-
-
-
- {siteTitle}
-
-
-
-
-);
-
-Header.defaultProps = {
- siteTitle: ``,
-};
-
-export default Header;
diff --git a/src/components/image.tsx b/src/components/image.tsx
deleted file mode 100644
index a10626dbb..000000000
--- a/src/components/image.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from 'react';
-import { useStaticQuery, graphql } from 'gatsby';
-import Img from 'gatsby-image';
-
-/*
- * This component is built using `gatsby-image` to automatically serve optimized
- * images with lazy loading and reduced file sizes. The image is loaded using a
- * `useStaticQuery`, which allows us to load the image from directly within this
- * component, rather than having to pass the image data down from pages.
- *
- * For more information, see the docs:
- * - `gatsby-image`: https://gatsby.dev/gatsby-image
- * - `useStaticQuery`: https://www.gatsbyjs.org/docs/use-static-query/
- */
-
-const Image = () => {
- const data = useStaticQuery(graphql`
- query {
- placeholderImage: file(relativePath: { eq: "gatsby-astronaut.png" }) {
- childImageSharp {
- fluid(maxWidth: 300) {
- ...GatsbyImageSharpFluid
- }
- }
- }
- }
- `);
-
- return (
-
- );
-};
-
-export default Image;
diff --git a/src/components/layout.less b/src/components/layout.less
deleted file mode 100644
index b6f63320f..000000000
--- a/src/components/layout.less
+++ /dev/null
@@ -1,622 +0,0 @@
-html {
- font-family: sans-serif;
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
-}
-body {
- margin: 0;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-main,
-menu,
-nav,
-section,
-summary {
- display: block;
-}
-audio,
-canvas,
-progress,
-video {
- display: inline-block;
-}
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-progress {
- vertical-align: baseline;
-}
-[hidden],
-template {
- display: none;
-}
-a {
- background-color: transparent;
- -webkit-text-decoration-skip: objects;
-}
-a:active,
-a:hover {
- outline-width: 0;
-}
-abbr[title] {
- border-bottom: none;
- text-decoration: underline;
- text-decoration: underline dotted;
-}
-b,
-strong {
- font-weight: inherit;
- font-weight: bolder;
-}
-dfn {
- font-style: italic;
-}
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-mark {
- background-color: #ff0;
- color: #000;
-}
-small {
- font-size: 80%;
-}
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-sub {
- bottom: -0.25em;
-}
-sup {
- top: -0.5em;
-}
-img {
- border-style: none;
-}
-svg:not(:root) {
- overflow: hidden;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, monospace;
- font-size: 1em;
-}
-figure {
- margin: 1em 40px;
-}
-hr {
- box-sizing: content-box;
- height: 0;
- overflow: visible;
-}
-button,
-input,
-optgroup,
-select,
-textarea {
- font: inherit;
- margin: 0;
-}
-optgroup {
- font-weight: 700;
-}
-button,
-input {
- overflow: visible;
-}
-button,
-select {
- text-transform: none;
-}
-[type="reset"],
-[type="submit"],
-button,
-html [type="button"] {
- -webkit-appearance: button;
-}
-[type="button"]::-moz-focus-inner,
-[type="reset"]::-moz-focus-inner,
-[type="submit"]::-moz-focus-inner,
-button::-moz-focus-inner {
- border-style: none;
- padding: 0;
-}
-[type="button"]:-moz-focusring,
-[type="reset"]:-moz-focusring,
-[type="submit"]:-moz-focusring,
-button:-moz-focusring {
- outline: 1px dotted ButtonText;
-}
-fieldset {
- border: 1px solid silver;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
-}
-legend {
- box-sizing: border-box;
- color: inherit;
- display: table;
- max-width: 100%;
- padding: 0;
- white-space: normal;
-}
-textarea {
- overflow: auto;
-}
-[type="checkbox"],
-[type="radio"] {
- box-sizing: border-box;
- padding: 0;
-}
-[type="number"]::-webkit-inner-spin-button,
-[type="number"]::-webkit-outer-spin-button {
- height: auto;
-}
-[type="search"] {
- -webkit-appearance: textfield;
- outline-offset: -2px;
-}
-[type="search"]::-webkit-search-cancel-button,
-[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-::-webkit-input-placeholder {
- color: inherit;
- opacity: 0.54;
-}
-::-webkit-file-upload-button {
- -webkit-appearance: button;
- font: inherit;
-}
-html {
- font: 112.5%/1.45em georgia, serif;
- box-sizing: border-box;
- overflow-y: scroll;
-}
-* {
- box-sizing: inherit;
-}
-*:before {
- box-sizing: inherit;
-}
-*:after {
- box-sizing: inherit;
-}
-body {
- color: hsla(0, 0%, 0%, 0.8);
- font-family: georgia, serif;
- font-weight: normal;
- word-wrap: break-word;
- font-kerning: normal;
- -moz-font-feature-settings: "kern", "liga", "clig", "calt";
- -ms-font-feature-settings: "kern", "liga", "clig", "calt";
- -webkit-font-feature-settings: "kern", "liga", "clig", "calt";
- font-feature-settings: "kern", "liga", "clig", "calt";
-}
-img {
- max-width: 100%;
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-h1 {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- color: inherit;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
- font-weight: bold;
- text-rendering: optimizeLegibility;
- font-size: 2.25rem;
- line-height: 1.1;
-}
-h2 {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- color: inherit;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
- font-weight: bold;
- text-rendering: optimizeLegibility;
- font-size: 1.62671rem;
- line-height: 1.1;
-}
-h3 {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- color: inherit;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
- font-weight: bold;
- text-rendering: optimizeLegibility;
- font-size: 1.38316rem;
- line-height: 1.1;
-}
-h4 {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- color: inherit;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
- font-weight: bold;
- text-rendering: optimizeLegibility;
- font-size: 1rem;
- line-height: 1.1;
-}
-h5 {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- color: inherit;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
- font-weight: bold;
- text-rendering: optimizeLegibility;
- font-size: 0.85028rem;
- line-height: 1.1;
-}
-h6 {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- color: inherit;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
- font-weight: bold;
- text-rendering: optimizeLegibility;
- font-size: 0.78405rem;
- line-height: 1.1;
-}
-hgroup {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-ul {
- margin-left: 1.45rem;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- list-style-position: outside;
- list-style-image: none;
-}
-ol {
- margin-left: 1.45rem;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- list-style-position: outside;
- list-style-image: none;
-}
-dl {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-dd {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-p {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-figure {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-pre {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- margin-bottom: 1.45rem;
- font-size: 0.85rem;
- line-height: 1.42;
- background: hsla(0, 0%, 0%, 0.04);
- border-radius: 3px;
- overflow: auto;
- word-wrap: normal;
- padding: 1.45rem;
-}
-table {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
- font-size: 1rem;
- line-height: 1.45rem;
- border-collapse: collapse;
- width: 100%;
-}
-fieldset {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-blockquote {
- margin-left: 1.45rem;
- margin-right: 1.45rem;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-form {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-noscript {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-iframe {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-hr {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: calc(1.45rem - 1px);
- background: hsla(0, 0%, 0%, 0.2);
- border: none;
- height: 1px;
-}
-address {
- margin-left: 0;
- margin-right: 0;
- margin-top: 0;
- padding-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- padding-top: 0;
- margin-bottom: 1.45rem;
-}
-b {
- font-weight: bold;
-}
-strong {
- font-weight: bold;
-}
-dt {
- font-weight: bold;
-}
-th {
- font-weight: bold;
-}
-li {
- margin-bottom: calc(1.45rem / 2);
-}
-ol li {
- padding-left: 0;
-}
-ul li {
- padding-left: 0;
-}
-li > ol {
- margin-left: 1.45rem;
- margin-bottom: calc(1.45rem / 2);
- margin-top: calc(1.45rem / 2);
-}
-li > ul {
- margin-left: 1.45rem;
- margin-bottom: calc(1.45rem / 2);
- margin-top: calc(1.45rem / 2);
-}
-blockquote *:last-child {
- margin-bottom: 0;
-}
-li *:last-child {
- margin-bottom: 0;
-}
-p *:last-child {
- margin-bottom: 0;
-}
-li > p {
- margin-bottom: calc(1.45rem / 2);
-}
-code {
- font-size: 0.85rem;
- line-height: 1.45rem;
-}
-kbd {
- font-size: 0.85rem;
- line-height: 1.45rem;
-}
-samp {
- font-size: 0.85rem;
- line-height: 1.45rem;
-}
-abbr {
- border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
- cursor: help;
-}
-acronym {
- border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
- cursor: help;
-}
-abbr[title] {
- border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
- cursor: help;
- text-decoration: none;
-}
-thead {
- text-align: left;
-}
-td,
-th {
- text-align: left;
- border-bottom: 1px solid hsla(0, 0%, 0%, 0.12);
- font-feature-settings: "tnum";
- -moz-font-feature-settings: "tnum";
- -ms-font-feature-settings: "tnum";
- -webkit-font-feature-settings: "tnum";
- padding-left: 0.96667rem;
- padding-right: 0.96667rem;
- padding-top: 0.725rem;
- padding-bottom: calc(0.725rem - 1px);
-}
-th:first-child,
-td:first-child {
- padding-left: 0;
-}
-th:last-child,
-td:last-child {
- padding-right: 0;
-}
-tt,
-code {
- background-color: hsla(0, 0%, 0%, 0.04);
- border-radius: 3px;
- font-family: "SFMono-Regular", Consolas, "Roboto Mono", "Droid Sans Mono",
- "Liberation Mono", Menlo, Courier, monospace;
- padding: 0;
- padding-top: 0.2em;
- padding-bottom: 0.2em;
-}
-pre code {
- background: none;
- line-height: 1.42;
-}
-code:before,
-code:after,
-tt:before,
-tt:after {
- letter-spacing: -0.2em;
- content: " ";
-}
-pre code:before,
-pre code:after,
-pre tt:before,
-pre tt:after {
- content: "";
-}
-@media only screen and (max-width: 480px) {
- html {
- font-size: 100%;
- }
-}
diff --git a/src/components/layout.tsx b/src/components/layout.tsx
deleted file mode 100644
index 9bfcb48bd..000000000
--- a/src/components/layout.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Layout component that queries for data
- * with Gatsby's useStaticQuery component
- *
- * See: https://www.gatsbyjs.org/docs/use-static-query/
- */
-
-import React from 'react';
-import { useStaticQuery, graphql } from 'gatsby';
-
-import Header from './header';
-import './layout.less';
-
-interface LayoutProps {
- children?: React.ReactNode;
-}
-
-const Layout: React.FC = ({ children }) => {
- const data = useStaticQuery(graphql`
- query SiteTitleQuery {
- site {
- siteMetadata {
- title
- }
- }
- }
- `);
-
- return (
- <>
-
-
-
{children}
-
-
- >
- );
-};
-
-export default Layout;
diff --git a/src/components/seo.tsx b/src/components/seo.tsx
deleted file mode 100644
index 9bc019d27..000000000
--- a/src/components/seo.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * SEO component that queries for data with
- * Gatsby's useStaticQuery React hook
- *
- * See: https://www.gatsbyjs.org/docs/use-static-query/
- */
-
-import React from 'react';
-import Helmet from 'react-helmet';
-import { useStaticQuery, graphql } from 'gatsby';
-
-interface SEOProps {
- description?: string;
- lang?: string;
- meta?: any[];
- title?: string;
-}
-
-const SEO: React.FC = ({ description, lang, meta = [], title }) => {
- const { site } = useStaticQuery(
- graphql`
- query {
- site {
- siteMetadata {
- title
- description
- }
- }
- }
- `,
- );
-
- const metaDescription = description || site.siteMetadata.description;
-
- return (
-
- );
-};
-
-SEO.defaultProps = {
- lang: `en`,
- meta: [],
- description: ``,
-};
-
-export default SEO;
diff --git a/src/images/favicon.png b/src/images/favicon.png
deleted file mode 100644
index 0ca1499e9..000000000
Binary files a/src/images/favicon.png and /dev/null differ
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
deleted file mode 100644
index a152c70bd..000000000
--- a/src/pages/404.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-
-import Layout from '../components/layout';
-import SEO from '../components/seo';
-
-const NotFoundPage = () => (
-
-
- NOT FOUND
- You just hit a route that doesn't exist... the sadness.
-
-);
-
-export default NotFoundPage;
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
deleted file mode 100644
index 211b76195..000000000
--- a/src/pages/index.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import React from 'react';
-
-import Layout from '../components/layout';
-import SEO from '../components/seo';
-
-const IndexPage = () => (
-
-
- Hi people
-
-);
-
-export default IndexPage;
diff --git a/tsconfig.json b/tsconfig.json
index 66bdf3e88..a595aa4e0 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,5 +1,5 @@
{
- "include": ["./src/**/*"],
+ "include": ["site"],
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
@@ -10,6 +10,7 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmit": true,
+ "resolveJsonModule": true,
"skipLibCheck": true
}
}