g6/packages/site/.dumirc.ts

492 lines
14 KiB
TypeScript
Raw Normal View History

2023-08-24 10:17:57 +08:00
import { defineConfig } from 'dumi';
import { homepage, repository, version } from './package.json';
2023-02-02 10:31:36 +08:00
export default defineConfig({
2023-08-24 10:17:57 +08:00
locales: [
{ id: 'zh', name: '中文' },
{ id: 'en', name: 'English' },
],
title: 'G6', // 网站header标题
2023-02-02 10:31:36 +08:00
favicons: ['https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original'], // 网站 favicon
2023-08-24 10:17:57 +08:00
metas: [
// 自定义 meta 标签
2023-02-02 10:31:36 +08:00
{ name: 'keywords', content: 'G6' },
2023-08-24 10:17:57 +08:00
{
name: 'description',
content: 'A collection of charts made with the Grammar of Graphics',
},
2023-02-02 10:31:36 +08:00
],
themeConfig: {
title: 'G6',
description: 'A collection of charts made with the Grammar of Graphics',
2023-08-24 10:17:57 +08:00
defaultLanguage: 'zh', // 默认语言
isAntVSite: false, // 是否是 AntV 的大官网
siteUrl: homepage, // 官网地址
githubUrl: repository.url, // GitHub 地址
2023-11-20 19:19:46 +08:00
footerTheme: 'light', // 白色 底部主题
2023-08-24 10:17:57 +08:00
showSearch: true, // 是否显示搜索框
showGithubCorner: true, // 是否显示头部的 GitHub icon
showGithubStars: true, // 是否显示 GitHub star 数量
showAntVProductsCard: true, // 是否显示 AntV 产品汇总的卡片
showLanguageSwitcher: true, // 是否显示官网语言切换
showWxQrcode: true, // 是否显示头部菜单的微信公众号
showChartResize: true, // 是否在 demo 页展示图表视图切换
showAPIDoc: true, // 是否在 demo 页展示API文档
2023-02-02 10:31:36 +08:00
themeSwitcher: 'g2',
prefersColor: {
default: 'light',
switch: false,
},
2023-08-24 10:17:57 +08:00
versions: {
// 历史版本以及切换下拉菜单
[version]: 'https://g6-next.antv.antgroup.com',
2023-08-24 10:17:57 +08:00
'4.x': 'https://g6.antv.antgroup.com',
2023-02-02 10:31:36 +08:00
'3.2.x': 'https://g6-v3-2.antv.vision',
},
2023-08-24 10:17:57 +08:00
docsearchOptions: {
// 头部搜索框配置
2023-02-02 10:31:36 +08:00
apiKey: '9d1cd586972bb492b7b41b13a949ef30',
indexName: 'antv_g6',
},
navs: [
{
2023-08-24 10:17:57 +08:00
slug: 'docs/manual/introduction',
2023-02-02 10:31:36 +08:00
title: {
2023-08-24 10:17:57 +08:00
zh: '教程',
en: 'Manual',
2023-02-02 10:31:36 +08:00
},
},
{
2023-08-24 10:17:57 +08:00
slug: 'examples',
2023-02-02 10:31:36 +08:00
title: {
2023-08-24 10:17:57 +08:00
zh: '示例',
en: 'Examples',
2023-02-02 10:31:36 +08:00
},
},
{
slug: 'docs/apis',
2023-02-02 10:31:36 +08:00
title: {
zh: 'API',
en: 'API',
},
},
{
title: {
2023-08-24 10:17:57 +08:00
zh: '其他资源',
2023-02-02 10:31:36 +08:00
en: 'Online Tools',
},
dropdownItems: [
{
2023-08-24 10:17:57 +08:00
url: 'https://www.yuque.com/antv/g6-blog',
2023-02-02 10:31:36 +08:00
name: {
2023-08-24 10:17:57 +08:00
zh: '文章博客',
en: 'Blog',
2023-02-02 10:31:36 +08:00
},
},
{
2023-08-24 10:17:57 +08:00
url: 'https://g6.antv.antgroup.com',
2023-02-02 10:31:36 +08:00
name: {
zh: '国内镜像',
en: 'China Site',
2023-02-02 10:31:36 +08:00
},
},
2023-08-24 10:17:57 +08:00
],
2023-02-02 10:31:36 +08:00
},
],
2023-08-24 10:17:57 +08:00
ecosystems: [
// 头部的菜单中的「周边生态」
2023-02-02 10:31:36 +08:00
],
docs: [
{
slug: 'manual/tutorial',
title: {
zh: '入门教程',
en: 'Tutorial',
},
2023-09-01 17:08:40 +08:00
order: 5,
2023-02-02 10:31:36 +08:00
},
{
slug: 'manual/advanced',
title: {
zh: '进阶教程',
en: 'Advanced',
},
order: 6,
},
{
slug: 'manual/customize',
title: {
zh: '自定义扩展',
en: 'Customzing Extensions',
},
order: 7,
},
2023-02-02 10:31:36 +08:00
// ==========API====================
{
slug: 'apis/reference',
title: {
zh: 'API Reference',
en: 'API Reference',
},
order: 1,
},
{
2023-11-07 18:30:09 +08:00
slug: 'apis/data',
title: {
2023-11-07 18:30:09 +08:00
zh: '数据',
en: 'Data',
},
2023-11-07 18:30:09 +08:00
order: 2,
},
2023-08-31 22:14:22 +08:00
{
2023-11-07 18:30:09 +08:00
slug: 'apis/graph',
2023-08-31 22:14:22 +08:00
title: {
2023-11-07 18:30:09 +08:00
zh: '图实例',
en: 'Graph',
2023-08-31 22:14:22 +08:00
},
2023-11-07 18:30:09 +08:00
order: 2,
2023-08-31 22:14:22 +08:00
},
{
slug: 'apis/item',
title: {
zh: '元素',
en: 'Elements',
},
},
{
2023-11-10 15:00:08 +08:00
slug: 'apis/item/node',
title: {
zh: '节点',
en: 'Node',
},
2023-11-07 18:30:09 +08:00
order: 3,
},
2023-11-10 15:00:08 +08:00
{
slug: 'apis/item/edge',
title: {
zh: '边',
en: 'Edge',
2023-11-10 15:00:08 +08:00
},
order: 4,
},
{
slug: 'apis/item/combo',
title: {
zh: 'Combo',
en: 'Combo',
2023-11-10 15:00:08 +08:00
},
order: 5,
},
{
2023-11-07 18:30:09 +08:00
slug: 'apis/shape',
title: {
2023-11-07 18:30:09 +08:00
zh: '图形',
en: 'Shape',
},
2023-11-10 15:00:08 +08:00
order: 6,
2023-11-07 17:40:38 +08:00
},
{
2023-11-07 18:30:09 +08:00
slug: 'apis/layout',
2023-11-07 17:40:38 +08:00
title: {
2023-11-07 18:30:09 +08:00
zh: '布局',
en: 'layout',
2023-11-07 17:40:38 +08:00
},
2023-11-10 15:00:08 +08:00
order: 7,
},
2023-02-02 10:31:36 +08:00
{
2023-11-07 18:30:09 +08:00
slug: 'apis/behaviors',
2023-02-02 10:31:36 +08:00
title: {
2023-11-07 18:30:09 +08:00
zh: '交互',
en: 'Interaction',
2023-02-02 10:31:36 +08:00
},
2023-11-10 15:00:08 +08:00
order: 8,
2023-11-07 18:30:09 +08:00
},
{
slug: 'apis/plugins',
title: {
zh: '自由插件',
en: 'Plugin',
},
2023-11-10 15:00:08 +08:00
order: 9,
2023-02-02 10:31:36 +08:00
},
],
tutorials: [
{
slug: 'manual/about',
title: {
zh: '关于',
en: 'About',
},
order: 1,
},
],
examples: [
2023-08-30 10:59:32 +08:00
{
slug: 'feature',
icon: 'gallery',
title: {
zh: '5.0 新能力',
en: '5.0 Features',
2023-08-30 10:59:32 +08:00
},
},
2023-02-02 10:31:36 +08:00
{
slug: 'net',
icon: 'net',
title: {
2023-08-28 20:39:59 +08:00
zh: '图布局',
en: 'Graph Layout',
2023-02-02 10:31:36 +08:00
},
},
{
slug: 'item',
icon: 'shape',
title: {
zh: '元素',
en: 'Item',
},
},
{
slug: 'interaction',
icon: 'interaction',
title: {
zh: '交互',
en: 'Interaction',
},
},
{
slug: 'scatter',
icon: 'scatter',
title: {
zh: '动画',
en: 'Animation',
},
},
{
slug: 'tool',
icon: 'tool',
title: {
zh: '组件',
en: 'Component',
},
},
{
slug: 'performance',
icon: 'net',
title: {
zh: '性能测试',
en: 'Performance',
},
},
],
mdPlayground: {
// 第一个分块的大小
splitPaneMainSize: '62%',
},
playground: {},
2023-02-02 10:31:36 +08:00
announcement: {
zh: '',
en: '',
},
/** 首页技术栈介绍 */
detail: {
2023-11-20 19:19:46 +08:00
engine: {
zh: 'G6',
en: 'G6',
},
2023-02-02 10:31:36 +08:00
title: {
2023-11-20 19:19:46 +08:00
zh: 'G6·图可视化引擎',
en: 'G6·Graph Visualization Engine',
2023-02-02 10:31:36 +08:00
},
description: {
2023-08-28 20:39:59 +08:00
zh: 'G6 是一个简单、易用、完备的图可视化引擎,它在高定制能力的基础上,提供了一系列设计优雅、便于使用的图可视化解决方案。能帮助开发者搭建属于自己的图可视化、图分析、或图编辑器应用。',
en: 'G6 is graph visualization engine with simplicity and convenience. Based on the ability of customize, it provides a set of elegant graph visualization solutions, and helps developers to build up applications for graph visualization, graph analysis, and graph editor.',
2023-02-02 10:31:36 +08:00
},
image: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*6dSUSo3QTk0AAAAAAAAAAAAADmJ7AQ/original',
2023-11-20 19:19:46 +08:00
imageStyle: {
2023-11-21 17:50:46 +08:00
transform: 'scale(0.7)',
marginLeft: '100px',
marginTop: '70px',
2023-11-20 19:19:46 +08:00
},
2023-02-02 10:31:36 +08:00
buttons: [
{
text: {
2023-11-21 14:39:17 +08:00
zh: '开始使用',
en: 'Getting Started',
2023-02-02 10:31:36 +08:00
},
2023-11-21 14:39:17 +08:00
link: `/manual/introduction`,
2023-02-02 10:31:36 +08:00
},
{
text: {
2023-11-21 14:39:17 +08:00
zh: '图表示例',
en: 'Examples',
2023-02-02 10:31:36 +08:00
},
2023-11-21 14:39:17 +08:00
link: `/examples`,
2023-02-02 10:31:36 +08:00
type: 'primary',
},
],
},
/** 新闻公告,优先选择配置的,如果没有配置则使用远程的! */
news: [
{
type: {
zh: '推荐',
en: 'News',
},
title: {
2023-09-01 16:07:37 +08:00
zh: 'G6 5.0-beta 闪亮登场',
en: 'G6 5.0-beta is released!',
2023-02-02 10:31:36 +08:00
},
2023-09-01 16:07:37 +08:00
date: '2023.08.31',
link: 'https://zhuanlan.zhihu.com/p/653709725?',
2023-02-02 10:31:36 +08:00
},
{
type: {
zh: '推荐',
en: 'News',
},
title: {
2023-09-01 16:07:37 +08:00
zh: '图可视分析与搭建平台 GraphInsight 开源',
en: 'GraphInsight is opened source!',
2023-02-02 10:31:36 +08:00
},
date: '2022.11.22',
2023-09-01 16:07:37 +08:00
link: 'https://www.yuque.com/antv/blog/nyl5bkhdkicgm7v8',
2023-02-02 10:31:36 +08:00
},
],
/** 首页特性介绍 */
features: [
{
icon: 'https://gw.alipayobjects.com/zos/basement_prod/0e03c123-031b-48ed-9050-4ee18c903e94.svg',
title: {
zh: '专注关系,完备基建',
en: 'Dedicated & Complete',
},
description: {
zh: 'G6 是一个专注于关系数据的、完备的图可视化引擎',
2023-08-24 10:17:57 +08:00
en: 'G6 is a complete graph visualization engine, which focuses on relational data',
2023-02-02 10:31:36 +08:00
},
},
{
icon: 'https://gw.alipayobjects.com/zos/basement_prod/42d17359-8607-4227-af93-7509eabb3163.svg',
title: {
zh: '领域深钻,顶尖方案',
en: 'Top Solution',
},
description: {
zh: '扎根实际具体业务场景、结合业界领先成果,沉淀顶尖解决方案',
en: 'According to practical bussiness scenarios, we found out the top solutions',
},
},
{
icon: 'https://gw.alipayobjects.com/zos/basement_prod/acd8d1f3-d256-42b7-8340-27e5d5fde92c.svg',
title: {
zh: '简单易用,扩展灵活',
en: 'Simple & Extendable',
},
description: {
zh: 'Vivid, 精心设计的简单、灵活、高可拓展的接口,满足你的无限创意',
2023-08-24 10:17:57 +08:00
en: 'Well-designed simple, flexible, and extendable intefaces will satisfy your infinite originality',
},
2023-02-02 10:31:36 +08:00
},
],
/** 首页案例 */
cases: [
{
2023-08-28 20:39:59 +08:00
logo: 'https://camo.githubusercontent.com/53886f0e306c9f01c96dee2edca3992830b7cbb769118029a7e5d677deb7e67e/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f616e7466696e63646e2f306234487a4f63454a592f4772617068696e2e737667',
2023-02-02 10:31:36 +08:00
title: {
zh: 'Graphin 图可视分析组件',
en: 'Graphin: Graph Insight',
},
description: {
zh: 'Graphin 是一款基于 G6 封装的 React 分析组件库,专注在关系可视分析领域,简单高效,开箱即用。',
2023-08-28 20:39:59 +08:00
en: "Graphin stands for Graph Insight. It's a toolkit based on G6 and React, that focuses on relational visual analysis.It's simple, efficient, out of the box.",
2023-02-02 10:31:36 +08:00
},
link: `https://graphin.antv.vision`,
2023-08-24 10:17:57 +08:00
image: 'https://gw.alipayobjects.com/mdn/rms_00edcb/afts/img/A*LKq7Q5wPA0AAAAAAAAAAAAAAARQnAQ',
2023-02-02 10:31:36 +08:00
},
{
logo: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*ch6rTrCxb6YAAAAAAAAAAABkARQnAQ',
title: {
zh: '基于 G6 的动态决策树',
en: 'Interactive Decision Graph Powered by G6',
},
description: {
zh: '基于 G6 实现的动态决策树,辅助用户寻找合适的可视化方式。它展示了 G6 强大的自定义节点和动画的能力。',
2023-08-28 20:39:59 +08:00
en: 'It is an interactive graph for users to find out an appropriate visualization method for their requirements. The demo shows the powerful custom node and animation ability of G6.',
2023-02-02 10:31:36 +08:00
},
link: `/examples/case/graphDemos/#decisionBubbles`,
2023-08-24 10:17:57 +08:00
image: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*10b6R5fkyJ4AAAAAAAAAAABkARQnAQ',
2023-02-02 10:31:36 +08:00
},
{
logo: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*95GYRI0zPx8AAAAAAAAAAABkARQnAQ',
title: {
zh: '基于 G6 的图分析应用',
en: 'Graph Analysis App Powered by G6',
},
description: {
2023-08-28 20:39:59 +08:00
zh: '社交网络分析是图可视化中一个重要的应用场景。随着社交网络越来越流行,人与人、人与组织之间的关系变得越来越复杂,使用传统的分析手段,已经很难满足我们的分析需求。在这种情况下,图分析及图可视化显得愈发重要。',
en: 'Social network is an important scenario in graph visualization. The relationships become complicate with the development of social network. Graph visualization and analysis do well on these complex cases.',
2023-02-02 10:31:36 +08:00
},
link: `/manual/cases/relations`,
2023-08-24 10:17:57 +08:00
image: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RYFQSZYewokAAAAAAAAAAABkARQnAQ',
2023-02-02 10:31:36 +08:00
},
{
logo: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*IEQFS5VtXX8AAAAAAAAAAABkARQnAQ',
title: {
zh: '基于 G6 的关系时序分析应用',
en: 'Dynamic Relationships Analysis Powered by G6',
},
description: {
2023-08-28 20:39:59 +08:00
zh: '基于 G6 的关系时序分析应用,解决应急过程中流程、影响面、应急预案等一系列应急决策辅助信息和手段,快速止血以减少和避免故障升级。',
en: 'This is an application for dynamic relationships analysis based on G6, which helps people deal with the flow, influence, and find out solutions to avoid losses and faults.',
2023-02-02 10:31:36 +08:00
},
link: `/manual/cases/sequenceTime`,
2023-08-24 10:17:57 +08:00
image: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*m41kSpg17ZkAAAAAAAAAAABkARQnAQ',
2023-02-02 10:31:36 +08:00
},
],
/** 首页合作公司 */
companies: [
2023-08-24 10:17:57 +08:00
{
name: '阿里云',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*V_xMRIvw2iwAAAAAAAAAAABkARQnAQ',
2023-02-02 10:31:36 +08:00
},
2023-08-24 10:17:57 +08:00
{
name: '支付宝',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*lYDrRZvcvD4AAAAAAAAAAABkARQnAQ',
},
{
name: '天猫',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*BQrxRK6oemMAAAAAAAAAAABkARQnAQ',
},
{
name: '淘宝网',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*1l8-TqUr7UcAAAAAAAAAAABkARQnAQ',
},
{
name: '网上银行',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*ZAKFQJ5Bz4MAAAAAAAAAAABkARQnAQ',
},
{
name: '京东',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*yh-HRr3hCpgAAAAAAAAAAABkARQnAQ',
},
{
name: 'yunos',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*_js7SaNosUwAAAAAAAAAAABkARQnAQ',
},
{
name: '菜鸟',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*TgV-RZDODJIAAAAAAAAAAABkARQnAQ',
},
],
2023-02-02 10:31:36 +08:00
},
mfsu: false,
alias: {
2023-08-24 10:17:57 +08:00
'@': __dirname,
2023-02-02 10:31:36 +08:00
},
2023-08-24 10:17:57 +08:00
links: [],
2023-02-02 10:31:36 +08:00
jsMinifier: 'terser',
analytics: {
ga_v2: 'G-YLQBGDK1GT',
},
2023-02-02 10:31:36 +08:00
});