Skip to content

Commit

Permalink
docs: adjust docs structure, create docs template (#5670)
Browse files Browse the repository at this point in the history
* docs: remove old docs

* docs: adjust example dir name

* feat: add script to create doc template

* docs: create site docs template

* docs: adjust api/element structure

* docs: adjust graph docs

* docs: adjust category naming
  • Loading branch information
Aarebecca authored Apr 23, 2024
1 parent 187a86d commit ea9cc6b
Show file tree
Hide file tree
Showing 873 changed files with 374 additions and 30,687 deletions.
171 changes: 70 additions & 101 deletions packages/site/.dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,30 @@ export default defineConfig({
},
navs: [
{
slug: 'docs/manual/introduction',
slug: 'docs/manual',
title: {
zh: '教程',
en: 'Manual',
zh: '文档',
en: 'Docs',
},
},
{
slug: 'examples',
slug: 'docs/apis',
title: {
zh: '示例',
en: 'Examples',
zh: 'API',
en: 'API',
},
},
{
slug: 'docs/apis',
slug: 'examples',
title: {
zh: 'API',
en: 'API',
zh: '图表示例',
en: 'Playground',
},
},
{
title: {
zh: '其他资源',
en: 'Online Tools',
zh: '社区',
en: 'Community',
},
dropdownItems: [
{
Expand All @@ -84,156 +84,125 @@ export default defineConfig({
},
},
{
url: 'https://g6.antv.antgroup.com',
url: 'https://g6-next.antv.antgroup.com',
name: {
zh: '国内镜像',
en: 'China Site',
en: 'Site in China',
},
},
],
},
],
ecosystems: [
// 头部的菜单中的「周边生态」
],
docs: [
// Docs folder
{
slug: 'manual/v5',
title: {
zh: '🎉 新版本 5.0',
en: '🎉 New v5.0',
},
order: 4,
},
{
slug: 'manual/tutorial',
slug: 'manual/core-concept',
title: {
zh: '入门教程',
en: 'Tutorial',
zh: '核心概念',
en: 'Concepts',
},
order: 5,
order: 3,
},
{
slug: 'manual/advanced',
title: {
zh: '进阶教程',
zh: '进阶指南',
en: 'Advanced',
},
order: 6,
},
{
slug: 'manual/customize',
title: {
zh: '自定义扩展',
en: 'Customzing Extensions',
},
order: 7,
order: 4,
},
// ==========API====================
// APIs folder
{
slug: 'apis/reference',
slug: 'apis/graph',
title: {
zh: 'API 文档',
en: 'API Reference',
zh: 'Graph - 图',
en: 'Graph',
},
order: 1,
},
{
slug: 'apis/data',
title: {
zh: '数据',
zh: 'Data - 数据',
en: 'Data',
},
order: 2,
},
{
slug: 'apis/graph',
slug: 'apis/element',
title: {
zh: '图实例',
en: 'Graph',
zh: 'Element - 元素',
en: 'Element',
},
order: 2,
},
{
slug: 'apis/item',
slug: 'apis/element/node',
title: {
zh: '元素',
en: 'Elements',
zh: 'Node - 节点',
en: 'Node',
},
},
{
slug: 'apis/item/node',
slug: 'apis/element/edge',
title: {
zh: '节点',
en: 'Node',
zh: 'Edge - 边',
en: 'Edge',
},
order: 3,
},
{
slug: 'apis/item/edge',
slug: 'apis/element/combo',
title: {
zh: '',
en: 'Edge',
zh: 'Combo - 组合',
en: 'Combo',
},
order: 4,
},
{
slug: 'apis/item/combo',
slug: 'apis/layout',
title: {
zh: 'Combo',
en: 'Combo',
zh: 'Layout - 布局',
en: 'Layout',
},
order: 5,
},
{
slug: 'apis/shape',
slug: 'apis/behavior',
title: {
zh: '图形',
en: 'Shape',
zh: 'Behavior - 交互',
en: 'Behavior',
},
order: 6,
},
{
slug: 'apis/layout',
slug: 'apis/plugin',
title: {
zh: '布局',
en: 'layout',
zh: 'Plugin - 插件',
en: 'Plugin',
},
order: 7,
},
{
slug: 'apis/behaviors',
slug: 'apis/extension',
title: {
zh: '交互',
en: 'Interaction',
zh: 'Extension - 扩展',
en: 'Extension',
},
order: 8,
},
{
slug: 'apis/plugins',
slug: 'apis/function',
title: {
zh: '自由插件',
en: 'Plugin',
zh: 'Function - 函数',
en: 'Function',
},
order: 9,
},
],
tutorials: [
{
slug: 'manual/about',
slug: 'apis/export',
title: {
zh: '关于',
en: 'About',
zh: 'Export - 导出',
en: 'Export',
},
order: 1,
},
],
examples: [
{
slug: 'feature',
icon: 'gallery',
title: {
zh: '5.0 新能力',
zh: '5.0 特性',
en: '5.0 Features',
},
},
Expand All @@ -246,50 +215,50 @@ export default defineConfig({
},
},
{
slug: 'net',
slug: 'layout',
icon: 'net',
title: {
zh: '图布局',
en: 'Graph Layout',
},
},
{
slug: 'item',
slug: 'element',
icon: 'shape',
title: {
zh: '元素',
en: 'Item',
en: 'Element',
},
},
{
slug: 'interaction',
slug: 'behavior',
icon: 'interaction',
title: {
zh: '交互',
en: 'Interaction',
en: 'Behavior',
},
},
{
slug: 'scatter',
slug: 'animation',
icon: 'scatter',
title: {
zh: '动画',
en: 'Animation',
},
},
{
slug: 'tool',
slug: 'plugin',
icon: 'tool',
title: {
zh: '组件',
en: 'Component',
zh: '插件',
en: 'Plugin',
},
},
{
slug: 'performance',
icon: 'net',
title: {
zh: '性能测试',
zh: '性能',
en: 'Performance',
},
},
Expand Down Expand Up @@ -334,7 +303,7 @@ export default defineConfig({
{
text: {
zh: '图表示例',
en: 'Examples',
en: 'Playground',
},
link: `/examples`,
type: 'primary',
Expand Down Expand Up @@ -389,7 +358,7 @@ export default defineConfig({
},
description: {
zh: '扎根实际具体业务场景、结合业界领先成果,沉淀顶尖解决方案',
en: 'According to practical bussiness scenarios, we found out the top solutions',
en: 'According to practical business scenarios, we found out the top solutions',
},
},
{
Expand All @@ -400,7 +369,7 @@ export default defineConfig({
},
description: {
zh: 'Vivid, 精心设计的简单、灵活、高可拓展的接口,满足你的无限创意',
en: 'Well-designed simple, flexible, and extendable intefaces will satisfy your infinite originality',
en: 'Well-designed simple, flexible, and extendable interfaces will satisfy your infinite originality',
},
},
],
Expand Down Expand Up @@ -478,7 +447,7 @@ export default defineConfig({
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*1l8-TqUr7UcAAAAAAAAAAABkARQnAQ',
},
{
name: '网上银行',
name: '网商银行',
img: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*ZAKFQJ5Bz4MAAAAAAAAAAABkARQnAQ',
},
{
Expand Down
3 changes: 3 additions & 0 deletions packages/site/docs/apis/behavior/default.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: (Demo)Behavior
---
3 changes: 3 additions & 0 deletions packages/site/docs/apis/behavior/default.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: (示例)交互
---
31 changes: 0 additions & 31 deletions packages/site/docs/apis/behaviors/ActivateRelationsOptions.en.md

This file was deleted.

Loading

0 comments on commit ea9cc6b

Please sign in to comment.