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
6 changes: 4 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import { isMermaidFence, renderMermaidFence } from './theme/markdown/mermaid'
import { tinyEditorDemoPlugin } from './theme/markdown/tiny-editor-demo'
import { tinyproDocsPlugin } from './theme/markdown/tinypro-docs'
import { tinyRobotLinks } from './theme/markdown/tiny-robot-links'
import path from 'path'
import fs from 'node:fs'
import { fileURLToPath } from 'url'
Expand Down Expand Up @@ -128,6 +129,7 @@ export default defineConfig({
// tiny-editor 的 :::demo src=... 转成 <demo vue="..." />,再交给 vitepress-demo-plugin
md.use(tinyEditorDemoPlugin)
md.use(tinyproDocsPlugin)
md.use(tinyRobotLinks)
md.use(vitepressDemoPlugin, {
playground: { show: true },
codeTransformer: (code) => {
Expand Down Expand Up @@ -168,12 +170,12 @@ export default defineConfig({
},
{
text: '演示',
link: '/tiny-robot/examples/assistant',
link: '/tiny-robot/examples/chat-tiny-robot',
activeMatch: '/examples/'
},
{
text: '迁移指南',
link: '/tiny-robot/migration/bubble-migration',
link: '/tiny-robot/migration/',
activeMatch: '/migration/'
}
],
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ const redirectMap = [
},
{
patterns: ['/tiny-robot/components.html', '/tiny-robot/components/'],
target: '/tiny-robot/components/container'
target: '/tiny-robot/components/layout'
},
{
patterns: ['/tiny-robot/tools.html', '/tiny-robot/tools/'],
target: '/tiny-robot/tools/ai-client'
},
{
patterns: ['/tiny-robot/examples/', '/tiny-robot/examples.html'],
target: '/tiny-robot/examples/assistant'
target: '/tiny-robot/examples/chat-tiny-robot'
},
{
patterns: ['/next-sdk.html', '/next-sdk/', '/next-sdk/guide.html', '/next-sdk/guide/'],
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/CustomHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ const getActiveNavTab = () => {

const productPathMap: Record<string, string[]> = {
"next-sdk": ["/next-sdk/"],
"tiny-robot": ["/components/", "/tools/"],
"tiny-robot": ["/components/", "/tools/", "/suites/", "/best-practices/"],
"tiny-editor": ["/demo/", "/api/", "/modules/"],
"web-agent": ["/web-agent/"],
"tiny-pro": ["/tiny-pro/"],
Expand Down
8 changes: 4 additions & 4 deletions .vitepress/theme/home/components/HeroSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const categoryCards = [
links: [
{ text: "NEXT-SDKs WebMCP API", url: "/next-sdk/guide/webmcp-article.html" },
{ text: "TinyEditor API", url: "/tiny-editor/api/fluent-editor-instance.html" },
{ text: "TinyRobot API", url: "/tiny-robot/tools/ai-client.html#api" },
{ text: "TinyRobot API", url: "/tiny-robot/suites/chat.html#trchat-api" },
{ text: "WebAgent API", url: "/web-agent/guide/api-reference.html" },
],
},
Expand All @@ -207,7 +207,7 @@ const categoryCards = [
links: [
{ text: "NEXT-SDKs WebMCP", url: "/next-sdk/guide/quick-start.html" },
{ text: "TinyEditor", url: "/tiny-editor/guide/quick-start.html" },
{ text: "TinyRobot", url: "/tiny-robot/components/container.html" },
{ text: "TinyRobot", url: "/tiny-robot/suites/quick-start.html" },
{ text: "WebAgent API", url: "/web-agent/guide/api-reference.html" },
],
},
Expand All @@ -218,7 +218,7 @@ const categoryCards = [
links: [
{ text: "NEXT-SDKs", url: "/next-sdk/guide/quick-start.html" },
{ text: "GenUI SDK", url: "/genui-sdk/guide/quick-start.html" },
{ text: "TinyRobot", url: "/tiny-robot/guide/quick-start.html" },
{ text: "TinyRobot", url: "/tiny-robot/best-practices/extension-manager-integration.html" },
{ text: "AI Extension", url: "/tiny-robot-ai/quick-start.html" },
{ text: "TinyVue", url: "/tiny-vue/guide/installation.html" },
{ text: "TinyEditor", url: "/tiny-editor/guide/quick-start.html" },
Expand All @@ -232,7 +232,7 @@ const categoryCards = [
subtitle: "体验各产品功能与示例",
icon: `${prefix}images/icon-demo.svg`,
links: [
{ text: "TinyRobot", url: "/tiny-robot/examples/assistant.html" },
{ text: "TinyRobot", url: "/tiny-robot/examples/chat-tiny-robot.html" },
{ text: "TinyEditor", url: "/tiny-editor/demo/basic-usage.html" },
{ text: "TinyEngine", url: "https://opentiny.design/tiny-engine#/tiny-engine-editor" },
],
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/theme/home/components/ProductSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ const productCards = [
desc: "AI 对话组件库",
icon: `${prefix}images/icon-tiny-robot.svg`,
links: [
{ text: "综合示例", url: "/tiny-robot/examples/assistant" },
{ text: "迁移指南", url: "/tiny-robot/migration/bubble-migration" },
{ text: "产品演示", url: "/tiny-robot/examples/chat-tiny-robot" },
{ text: "迁移指南", url: "/tiny-robot/migration/" },
],
},
{
Expand Down
19 changes: 19 additions & 0 deletions .vitepress/theme/markdown/tiny-robot-links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { MarkdownRenderer } from 'vitepress'

const tinyRobotSection = /^\/(?:guide|suites|components|tools|best-practices|icons|examples|migration)(?=\/|[?#]|$)/

export function tinyRobotLinks(md: MarkdownRenderer) {
md.core.ruler.after('inline', 'tiny-robot-links', (state) => {
if (!state.env.relativePath?.startsWith('tiny-robot/')) return

for (const token of state.tokens) {
for (const child of token.children ?? []) {
if (child.type !== 'link_open') continue
const href = child.attrGet('href')
if (href && tinyRobotSection.test(href)) {
child.attrSet('href', `/tiny-robot${href}`)
}
}
}
})
}
1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
packages:
- tiny-robot/**
- '!tiny-robot/packages/cli/templates/**'
- genui
- genui/genui-sdk/packages/frameworks/angular
- genui/genui-sdk/packages/core
Expand Down
2 changes: 1 addition & 1 deletion tiny-robot
Submodule tiny-robot updated 647 files
Loading