release: bump version to 0.42.2
This commit is contained in:
@@ -21,6 +21,29 @@ interface DocsMetadataEntry {
|
||||
en: { title: string; group: DocsGroup; order: number }
|
||||
}
|
||||
|
||||
const DOCS_GROUP_LABELS: Record<DocsLang, Record<DocsGroup, string>> = {
|
||||
zh: {
|
||||
Overview: '概览',
|
||||
Manual: '使用手册',
|
||||
Earth: '地球可视化',
|
||||
Frontend: '前端',
|
||||
Backend: '后端',
|
||||
Agents: '智能体',
|
||||
Ops: '运维',
|
||||
Other: '其他',
|
||||
},
|
||||
en: {
|
||||
Overview: 'Overview',
|
||||
Manual: 'Manual',
|
||||
Earth: 'Earth',
|
||||
Frontend: 'Frontend',
|
||||
Backend: 'Backend',
|
||||
Agents: 'Agents',
|
||||
Ops: 'Ops',
|
||||
Other: 'Other',
|
||||
},
|
||||
}
|
||||
|
||||
const DOCS_README_FILENAME = 'README.md'
|
||||
const FALLBACK_DOCS_ORDER = 999
|
||||
const MAX_HEADING_ID_LENGTH = 80
|
||||
@@ -42,7 +65,7 @@ const DOCS_METADATA: Record<string, DocsMetadataEntry> = {
|
||||
en: { title: 'Technical Docs', group: 'Overview', order: 0 },
|
||||
},
|
||||
'quickstart.md': {
|
||||
zh: { title: 'Quickstart', group: 'Manual', order: 1 },
|
||||
zh: { title: '快速开始', group: 'Manual', order: 1 },
|
||||
en: { title: 'Quickstart', group: 'Manual', order: 1 },
|
||||
},
|
||||
'manual.md': {
|
||||
@@ -50,7 +73,7 @@ const DOCS_METADATA: Record<string, DocsMetadataEntry> = {
|
||||
en: { title: 'Planet Manual', group: 'Manual', order: 2 },
|
||||
},
|
||||
'earth-frontend-context.md': {
|
||||
zh: { title: 'Earth Frontend Context', group: 'Earth', order: 10 },
|
||||
zh: { title: 'Earth 前端结构', group: 'Earth', order: 10 },
|
||||
en: { title: 'Earth Frontend Context', group: 'Earth', order: 10 },
|
||||
},
|
||||
'earth-layer-style-reference.md': {
|
||||
@@ -62,23 +85,23 @@ const DOCS_METADATA: Record<string, DocsMetadataEntry> = {
|
||||
en: { title: 'Earth Render Layer Order', group: 'Earth', order: 12 },
|
||||
},
|
||||
'earth-satellite-footprint-policy.md': {
|
||||
zh: { title: 'Earth Satellite Footprint Policy', group: 'Earth', order: 13 },
|
||||
zh: { title: 'Earth 卫星覆盖策略', group: 'Earth', order: 13 },
|
||||
en: { title: 'Earth Satellite Footprint Policy', group: 'Earth', order: 13 },
|
||||
},
|
||||
'earth-bgp-context.md': {
|
||||
zh: { title: 'BGP Context', group: 'Earth', order: 14 },
|
||||
zh: { title: 'BGP 态势上下文', group: 'Earth', order: 14 },
|
||||
en: { title: 'BGP Context', group: 'Earth', order: 14 },
|
||||
},
|
||||
'earth-news-live-streams-collector-format.md': {
|
||||
zh: { title: 'News Live Streams Collector Format', group: 'Earth', order: 15 },
|
||||
zh: { title: '新闻直播采集格式', group: 'Earth', order: 15 },
|
||||
en: { title: 'News Live Streams Collector Format', group: 'Earth', order: 15 },
|
||||
},
|
||||
'frontend-admin-frontend-context.md': {
|
||||
zh: { title: 'Admin Frontend Context', group: 'Frontend', order: 20 },
|
||||
zh: { title: '控制台前端结构', group: 'Frontend', order: 20 },
|
||||
en: { title: 'Admin Frontend Context', group: 'Frontend', order: 20 },
|
||||
},
|
||||
'frontend-layout-guidelines.md': {
|
||||
zh: { title: 'Frontend Layout Guidelines', group: 'Frontend', order: 21 },
|
||||
zh: { title: '前端布局指南', group: 'Frontend', order: 21 },
|
||||
en: { title: 'Frontend Layout Guidelines', group: 'Frontend', order: 21 },
|
||||
},
|
||||
'backend-collectors.md': {
|
||||
@@ -86,11 +109,11 @@ const DOCS_METADATA: Record<string, DocsMetadataEntry> = {
|
||||
en: { title: 'Data Collectors', group: 'Backend', order: 30 },
|
||||
},
|
||||
'backend-system-service-control.md': {
|
||||
zh: { title: 'System Service Control', group: 'Backend', order: 31 },
|
||||
zh: { title: '系统服务控制', group: 'Backend', order: 31 },
|
||||
en: { title: 'System Service Control', group: 'Backend', order: 31 },
|
||||
},
|
||||
'agents-aiprovider.md': {
|
||||
zh: { title: 'AI Provider Guide', group: 'Agents', order: 40 },
|
||||
zh: { title: 'AI Provider 指南', group: 'Agents', order: 40 },
|
||||
en: { title: 'AI Provider Guide', group: 'Agents', order: 40 },
|
||||
},
|
||||
'ops-docker-compose-buildx-upgrade.md': {
|
||||
@@ -154,6 +177,10 @@ export function groupDocsEntries(entries: DocsEntry[]): Array<{ group: DocsGroup
|
||||
})).filter((group) => group.entries.length > 0)
|
||||
}
|
||||
|
||||
export function getDocsGroupLabel(group: DocsGroup, lang: DocsLang): string {
|
||||
return DOCS_GROUP_LABELS[lang][group]
|
||||
}
|
||||
|
||||
export function createHeadingId(text: string, usedIds: Map<string, number>): string {
|
||||
const base = text
|
||||
.toLowerCase()
|
||||
|
||||
Reference in New Issue
Block a user