Skip to content
Closed
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
39 changes: 29 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,42 @@ name: build

on:
push:
pull_request:

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: antvis-site

- name: Checkout site platform
uses: actions/checkout@v4
with:
repository: ${{ vars.ANTV_SITE_PLATFORM_REPOSITORY || 'antvis/site' }}
ref: ${{ vars.ANTV_SITE_PLATFORM_REF || '8da268521d695766fdf6e5b54d8142cfc19a0032' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
path: site-platform

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install
node-version: 22

- name: Enable Corepack
run: corepack enable

- name: Install site platform
run: corepack pnpm@10.34.5 --dir site-platform install --frozen-lockfile --ignore-scripts

- name: Build site platform
run: corepack pnpm@10.34.5 --dir site-platform build

- name: Type Check
run: npm run type-check
- name: Install site
run: corepack pnpm@10.34.5 --dir antvis-site install --frozen-lockfile --ignore-scripts

- name: Build
run: npm run build
- name: Check and build
run: |
corepack pnpm@10.34.5 --dir antvis-site check
corepack pnpm@10.34.5 --dir antvis-site build
34 changes: 27 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,38 @@ on:
workflow_dispatch:
push:
branches:
- master
- master

jobs:
deploy-site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build
- run: echo 'antv.vision' > dist/CNAME
- uses: actions/checkout@v4
with:
path: antvis-site
- name: Checkout site platform
uses: actions/checkout@v4
with:
repository: ${{ vars.ANTV_SITE_PLATFORM_REPOSITORY || 'antvis/site' }}
ref: ${{ vars.ANTV_SITE_PLATFORM_REF || '8da268521d695766fdf6e5b54d8142cfc19a0032' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
path: site-platform
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable Corepack
run: corepack enable
- name: Install site platform
run: corepack pnpm@10.34.5 --dir site-platform install --frozen-lockfile --ignore-scripts
- name: Build site platform
run: corepack pnpm@10.34.5 --dir site-platform build
- name: Install site
run: corepack pnpm@10.34.5 --dir antvis-site install --frozen-lockfile --ignore-scripts
- name: Build site
run: corepack pnpm@10.34.5 --dir antvis-site build
- run: |
cd dist
cd antvis-site/dist
git init
git config --local user.name antv
git config --local user.email github@antv.vision
Expand All @@ -24,6 +44,6 @@ jobs:
- uses: ad-m/github-push-action@master
with:
github_token: ${{secrets.PERSONAL_ACCESS_TOKEN}}
directory: dist
directory: antvis-site/dist
branch: gh-pages
force: true
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ typings/

# gatsby files
.cache/
public

# Mac files
.DS_Store
Expand All @@ -74,9 +73,13 @@ _site



# dumi production
# Site production
/dist

# @antv/site generated files
/.antv-site
/.astro

# dumi tmp_production
.dumi/tmp
.dumi/tmp-production
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.23.0
43 changes: 33 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
# AntV New Site 📈
# AntV Site

New AntV site built on [@antv/dumi-theme-antv](https://github.com/antvis/dumi-theme-antv).
The AntV full-stack visualization website is built with the sibling
[`@antv/site`](../site-platform) platform package.

![prettier code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)
The shared platform provides routing, documentation, search, the AntV header and
footer, and default design tokens. This repository owns the organization homepage,
product content, visual assets, and design-language documentation.

The site requires Node.js 22.12 or newer and pnpm 10.34.5.

## Install & Preview

```bash
npm install
npm start
nvm use
corepack pnpm@10.34.5 --dir ../site-platform install --frozen-lockfile --ignore-scripts
corepack pnpm@10.34.5 --dir ../site-platform build
corepack pnpm@10.34.5 install
corepack pnpm@10.34.5 start
```

Visit https://127.0.0.1:8000
`@antv/site` is linked from `../site-platform` through pnpm's `link:` protocol.
Install and build the platform first so its dependencies and compiled integration are
available to this repository.

CI and deployment pin a known-compatible `antvis/site` revision by default. Set the
`ANTV_SITE_PLATFORM_REPOSITORY` and `ANTV_SITE_PLATFORM_REF` repository variables to
test a different platform fork or revision.

## Prettier
The development server prints its local URL after startup.

## Validation

```bash
npm run format
corepack pnpm@10.34.5 check
corepack pnpm@10.34.5 build
```

## Deploy to antv.vision
## Deploy

```bash
npm run deploy
corepack pnpm@10.34.5 deploy
```

The legacy `.dumirc.ts`, `.dumi/`, and React components under `site/components/` are
retained as migration reference. The production homepage is mounted through the
`slots.home.hero` entry in `astro.config.mjs`. Its QA entry is provided by
`@antv/site/qa-entry`; the platform owns the shared service endpoints and standard
preview adapters, while the consumer selects the default stack and enabled products.
117 changes: 117 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import { defineConfig } from '@antv/site';

export default defineConfig({
site: {
title: 'AntV',
origin: 'https://antv.antgroup.com',
repository: 'https://github.com/antvis/antvis.github.io',
defaultLocale: 'zh',
locales: ['zh', 'en'],
favicon:
'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original',
logo: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*A-lcQbVTpjwAAAAAAAAAAAAADmJ7AQ/original',
description: {
zh: 'AntV 是蚂蚁集团全新一代数据可视化解决方案,提供简单方便、专业可靠、无限可能的数据可视化最佳实践。',
en: 'AntV is Ant Group’s next-generation data visualization solution, providing simple, reliable, and extensible visualization practices.',
},
},
content: {
docs: './docs',
examples: null,
edit: {
branch: 'master',
path: 'docs',
},
sidebar: {
'specification/principles': {
zh: '设计价值观',
en: 'Design Values',
order: 0,
},
'specification/language': {
zh: '设计语言',
en: 'Language',
order: 1,
},
'specification/strategy': {
zh: '设计策略',
en: 'Strategies',
order: 2,
},
'specification/graph': {
zh: '图表设计指引',
en: 'Visualization Guides',
order: 3,
},
'specification/module': {
zh: '组件设计指引',
en: 'Component Guides',
order: 4,
},
'specification/tool': {
zh: '工具',
en: 'Tools',
order: 6,
},
},
},
navigation: [
{
text: { zh: '产品', en: 'Products' },
href: '#products',
},
{
text: { zh: '设计语言', en: 'Design' },
href: '/specification/principles/basic',
},
],
search: {
enabled: false,
},
home: {
eyebrow: {
zh: 'AntV 企业级数据可视化',
en: 'Enterprise data visualization by AntV',
},
title: {
zh: '让 AI 栩栩如生',
en: 'Make AI come alive',
},
description: {
zh: '蚂蚁企业级数据可视化解决方案,让人们在数据世界里获得视觉化思考能力。',
en: 'Enterprise visualization technology that helps people think visually in a world of data.',
},
showStats: false,
actions: [],
features: [],
},
qa: {
path: 'result',
defaultStack: 'g2',
previewProducts: ['g2', 'g6', 's2'],
},
slots: {
home: {
hero: ['./site/Home.astro'],
},
},
theme: {
tokens: {
'--brand': '#691eff',
'--brand-strong': '#5312d6',
'--brand-button': '#5a16c9',
'--brand-soft': '#f0e8ff',
'--brand-faint': '#faf7ff',
},
},
footer: {
description: {
zh: '从底层渲染到智能分析,构建开放、可靠的全栈数据可视化技术。',
en: 'An open visualization stack spanning rendering, visual analysis, and intelligent tooling.',
},
},
demo: {
height: 480,
},
output: './dist',
});
5 changes: 5 additions & 0 deletions docs/specification/principles/basic.en.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Design Values
order: 0
---

The design values of AntV for data visualization are derived from the Ant Design design system (<a href='https://ant.design/docs/spec/introduce-cn' target='_blank'>Ant Design</a>) and serve as guiding principles with characteristics of data visualization. While adhering to the design values of Ant Design, it offers a further interpretation in the field of data visualization.

AntV's design language initially defined four design values: "Accuracy, Clarity, Effectiveness, and Beauty". After several years of extensive project practice in internal business and with the changes in users' demands for data analysis, new requirements have been put forward for charts.
Expand Down
1 change: 1 addition & 0 deletions examples/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Loading