diff --git a/components/compTongji.tsx b/components/compTongji.tsx index 94cd04f..a73d2d1 100644 --- a/components/compTongji.tsx +++ b/components/compTongji.tsx @@ -1,13 +1,14 @@ import { useEffect } from "react"; import { useLocation } from "@rspress/core/runtime"; - export default function PluginTongji() { const { pathname } = useLocation(); useEffect(() => { - if (typeof _hmt !== 'undefined') { - _hmt.push(['_trackPageview', pathname]); + + if (typeof _hmt !== 'undefined') { + console.log(pathname, '111'); + _hmt.push(['_trackPageview', pathname]); } }, [pathname]); diff --git a/docs/doracc.mdx b/docs/doracc.mdx index c9aea61..e5e22a1 100644 --- a/docs/doracc.mdx +++ b/docs/doracc.mdx @@ -48,4 +48,3 @@ sidebar: false * 新兴且活跃: 作为一个较新的项目,`dora-rs` 的中文社区虽然不像 ROS 等成熟框架那样庞大,但活跃度高,且与项目发展紧密相连。随着具身智能(Embodied AI)和人工智能应用的普及,这个社区有望快速成长。 `dora-rs` 中文社区是一个充满活力、正在快速成长的开发者群体。如果你对机器人、`AI` 和高性能系统开发充满热情,现在正是加入并共同塑造其未来的好时机。 - diff --git a/docs/example.mdx b/docs/example.mdx index e015e94..a20b030 100644 --- a/docs/example.mdx +++ b/docs/example.mdx @@ -4,8 +4,6 @@ sidebar: false # Dora + YOLOV8 快速目标检测 -作者: [李扬](https://echoli.cn) - ## 安装`dora` * 一键安装 diff --git a/docs/guide/start/introduction.mdx b/docs/guide/start/introduction.mdx index b51f1b5..a6864ff 100644 --- a/docs/guide/start/introduction.mdx +++ b/docs/guide/start/introduction.mdx @@ -1,7 +1,5 @@ # 介绍:Dora-rs是什么? -作者: [李扬](https://echoli.cn) - **`dora-rs`** (Dataflow-Oriented Robotic Architecture) 是一种旨在简化基于 **人工智能的具身智能机器人** 应用开发的框架 。其核心理念是将复杂的机器人应用程序建模为声明式的有向图,即“数据流” 。这种范式从根本上促进了系统的模块化、可配置性和可扩展性 。 ## 为什么选择`dora-rs` diff --git a/docs/guide/start/quick-start.mdx b/docs/guide/start/quick-start.mdx index b74c231..fc549f8 100644 --- a/docs/guide/start/quick-start.mdx +++ b/docs/guide/start/quick-start.mdx @@ -2,8 +2,6 @@ import { Tab, Tabs } from '@rspress/core/theme'; # 快速上手 -作者: [李扬](https://echoli.cn) - 安装 `dora-cli` 在命令行中运行以下命令 (不要带上 `$` 符号): diff --git a/docs/guide/tutorial/api-binding.mdx b/docs/guide/tutorial/api-binding.mdx index a269724..89b3f28 100644 --- a/docs/guide/tutorial/api-binding.mdx +++ b/docs/guide/tutorial/api-binding.mdx @@ -1,7 +1,5 @@ # 多语言支持:API 绑定 -作者: [李扬](https://echoli.cn) - 欢迎回到 `dora` 教程!到目前为止,我们已经学习了 [数据流](./dataflow) 作为应用程序蓝图 diff --git a/docs/guide/tutorial/data-message.mdx b/docs/guide/tutorial/data-message.mdx index d5fa37d..3c18f23 100644 --- a/docs/guide/tutorial/data-message.mdx +++ b/docs/guide/tutorial/data-message.mdx @@ -1,7 +1,5 @@ # 数据信息 / Arrow Data -作者: [李扬](https://echoli.cn) - 欢迎回到 `dora` 教程!在[事件流](./event-stream)中,我们学习了节点和操作符通过事件流接收信息,包括携带数据的 INPUT 事件。但是,这些数据在事件内部是什么样的? `dora` 又是如何高效地传输这些数据的,尤其是对于图像或传感器读数等大数据项? 本章深入探讨 `dora` 数据处理的核心: **`数据信息`** 及其对 **`Apache Arrow`** 格式的使用。 diff --git a/docs/guide/tutorial/dataflow.mdx b/docs/guide/tutorial/dataflow.mdx index 24ff2c6..f7f3545 100644 --- a/docs/guide/tutorial/dataflow.mdx +++ b/docs/guide/tutorial/dataflow.mdx @@ -1,7 +1,5 @@ # 数据流 -作者: [李扬](https://echoli.cn) - 欢迎来到 `dora` 教程! `dora` 是一个强大的框架,旨在帮助您构建复杂的应用程序,尤其是那些需要处理实时数据的应用程序,例如机器人技术或 `AI` 应用。 但是,如何设计和管理这些需要不同组件协同工作并共享信息的应用程序呢?这就是 **`Dataflow 数据流`** 的概念! diff --git a/docs/guide/tutorial/dora-cli.mdx b/docs/guide/tutorial/dora-cli.mdx index 4ed2213..ff746f0 100644 --- a/docs/guide/tutorial/dora-cli.mdx +++ b/docs/guide/tutorial/dora-cli.mdx @@ -1,7 +1,5 @@ # 命令行接口 -作者: [李扬](https://echoli.cn) - 欢迎回到 `dora` 教程!在上一章, [API 绑定](./api-binding) 中,我们了解了如何使用特定语言的库为自定义节点和操作符编写实际代码,以便与 `dora` 运行时进行通信。 但是,如何才能将完成的 `Dataflow` 和 `Node/Operator` 代码真正地运行在 `dora` 上呢?如何让 `dora` 启动、停止所有操作,或者查看哪些程序正在运行? diff --git a/docs/guide/tutorial/dora-coordinator.mdx b/docs/guide/tutorial/dora-coordinator.mdx index 4a094f5..0b18dda 100644 --- a/docs/guide/tutorial/dora-coordinator.mdx +++ b/docs/guide/tutorial/dora-coordinator.mdx @@ -1,7 +1,5 @@ # 协调器 -作者: [李扬](https://echoli.cn) - 欢迎来到 `dora` 教程的最后一章!在本教程中,我们学习了`数据流`、`节点`和`操作符` ,以及它们如何通过事件流进行通信并高效地传输数`据消息/Arrow Data`。 我们还了解了如何使用 `API` 绑定编写逻辑,以及如何使用 `Dora CLI` 作为命令行界面。最近,在 [Dora 守护进程](./dora-daemon) 中,我们学习了 `Dora` 守护进程,它是在单台机器上本地管理 `dora` 组件的后台服务。 diff --git a/docs/guide/tutorial/dora-daemon.mdx b/docs/guide/tutorial/dora-daemon.mdx index b80441e..1327353 100644 --- a/docs/guide/tutorial/dora-daemon.mdx +++ b/docs/guide/tutorial/dora-daemon.mdx @@ -1,7 +1,5 @@ # 守护进程 -作者: [李扬](https://echoli.cn) - 欢迎回到 `dora` 教程!我们探索了 `Dataflow`、 `节点` 和 `操作符` 等构建块,它们如何通过事件流接收信息,以及如何高效地传输 `数据消息/Arrow Data`。 我们还了解了 `API 绑定`如何帮助您编写组件代码,以及 `Dora CLI` 如何成为您管理一切的主要工具。 diff --git a/docs/guide/tutorial/event-stream.mdx b/docs/guide/tutorial/event-stream.mdx index 2afb5df..fb6ec76 100644 --- a/docs/guide/tutorial/event-stream.mdx +++ b/docs/guide/tutorial/event-stream.mdx @@ -1,7 +1,5 @@ # 事件流处理 -作者: [李扬](https://echoli.cn) - 欢迎回到 `dora` 教程!在[节点](./node)中,我们了解到节点是数据流中独立的工作单元。在[操作符](./operator)中,我们了解了操作符如何在一种特殊的节点内部构建工作。 `节点`和`操作符`都需要一种方法来感知需要关注的事件发生——例如新数据到达或停止命令。它们是如何接收这些重要通知的? diff --git a/docs/guide/tutorial/node.mdx b/docs/guide/tutorial/node.mdx index fe5516c..f31eee4 100644 --- a/docs/guide/tutorial/node.mdx +++ b/docs/guide/tutorial/node.mdx @@ -1,7 +1,5 @@ # 节点 -作者: [李扬](https://echoli.cn) - 欢迎回到 `dora` 的教程!在[上一章:数据流](./dataflow)中,我们了解到数据流是 `dora` 系统的蓝图,它使用 `YAML` 文件定义了所有部分以及数据在它们之间流动的方式。 现在,让我们深入研究这些单独的部分 —— **节点 `nodes`**。 diff --git a/docs/guide/tutorial/operator.mdx b/docs/guide/tutorial/operator.mdx index 2a1149a..96f6ee8 100644 --- a/docs/guide/tutorial/operator.mdx +++ b/docs/guide/tutorial/operator.mdx @@ -1,7 +1,5 @@ # 操作符 -作者: [李扬](https://echoli.cn) - 欢迎回来!在[数据流](./dataflow)中,我们学习了 `dora` 应用程序的整体蓝图以及它如何连接各个部分。在[节点](./node)中,我们深入探讨了这些节点部分,并了解到每个节点通常作为一个独立的进程运行,执行特定的任务,并通过数据流 `YAML` 中定义的输入和输出进行通信。 现在,让我们探索一种在 `Node` 内部添加更多结构和可重用性的方法: **`Operator 操作符`** 的概念。 diff --git a/docs/public/rspress-dark-logo.png b/docs/public/rspress-dark-logo.png deleted file mode 100644 index 928bcc9..0000000 Binary files a/docs/public/rspress-dark-logo.png and /dev/null differ diff --git a/docs/public/rspress-icon.png b/docs/public/rspress-icon.png deleted file mode 100644 index 6be2af2..0000000 Binary files a/docs/public/rspress-icon.png and /dev/null differ diff --git a/docs/public/rspress-light-logo.png b/docs/public/rspress-light-logo.png deleted file mode 100644 index 1e3442e..0000000 Binary files a/docs/public/rspress-light-logo.png and /dev/null differ diff --git a/package.json b/package.json index 3d5ae4f..311d07b 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@rspress/core": "^2.0.0-beta.21" }, "devDependencies": { + "@rstack-dev/doc-ui": "^1.10.8", "@types/node": "^22.8.1" } } diff --git a/rspress.config--.ts b/rspress.config--.ts deleted file mode 100644 index decfd6d..0000000 --- a/rspress.config--.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as path from 'node:path'; -import { defineConfig } from 'rspress/config'; - -export default defineConfig({ - root: path.join(__dirname, 'docs'), - title: 'Dora中文社区', - description: 'Dora中文社区 - 信息收集、文章推送、教程学习、技巧分享、社区交流', - icon: '/favicon.ico', - // lang: 'zh-CN', - logo: { - light: '/logo.svg', - dark: '/logo-dark.svg', - }, - logoText: 'Dora中文社区', - // route: { - // cleanUrls: true, - // }, - head: [ - '', - '' - ], - themeConfig: { - socialLinks: [ - { - icon: 'github', - mode: 'link', - content: 'https://github.com/DoraCN/doracc.com', - }, - ], - editLink: { - docRepoBaseUrl: 'https://github.com/DoraCN/doracc.com/tree/main/docs', - text: '📝 在 GitHub 上编辑此页', - }, - enableScrollToTop: true, - enableContentAnimation: true, - searchPlaceholderText: '搜索文档', - lastUpdated: true, - lastUpdatedText: '上次更新', - footer: { - message: '
Dora中文社区 © 2025 doracc.com
苏ICP备14007268号-19 | 苏公网安备32050602013520号 ', - }, - }, - markdown: { - showLineNumbers: true, - highlightLanguages: [ - ['py', 'python'], - ['rust', 'rust'], - ], - }, - mediumZoom: { - selector: '.rspress-doc img', - }, - globalStyles: path.join(__dirname, 'styles/global.css'), - globalUIComponents: [path.join(__dirname, 'components', 'compTongji.tsx')], -}); diff --git a/rspress.config.ts b/rspress.config.ts index 7dc9a82..ff13c5a 100644 --- a/rspress.config.ts +++ b/rspress.config.ts @@ -6,7 +6,13 @@ export default defineConfig({ title: 'Dora中文社区', description: 'Dora中文社区 - 信息收集、文章推送、教程学习、技巧分享、社区交流', icon: '/favicon.ico', - // lang: 'zh-CN', + // lang: 'zh', + // locales: [ + // { + // lang: 'zh', + // label: '中文', + // }, + // ], logo: { light: '/logo.svg', dark: '/logo-dark.svg', @@ -36,9 +42,9 @@ export default defineConfig({ searchPlaceholderText: '搜索文档', lastUpdated: true, lastUpdatedText: '上次更新', - footer: { - message: '
Dora中文社区 © 2025 doracc.com
苏ICP备14007268号-19 | 苏公网安备32050602013520号 ', - }, + // footer: { + // message: '
Dora中文社区 © 2025 doracc.com
苏ICP备14007268号-19 | 苏公网安备32050602013520号 ', + // }, }, markdown: { showLineNumbers: true, @@ -51,6 +57,6 @@ export default defineConfig({ mediumZoom: { selector: '.rspress-doc img', }, - // globalStyles: path.join(__dirname, 'styles/global.css'), - // globalUIComponents: [path.join(__dirname, 'components', 'compTongji.tsx')], + globalUIComponents: [path.join(__dirname, 'components', 'compTongji.tsx')], }); + \ No newline at end of file diff --git a/styles/global.css b/theme/index.css similarity index 55% rename from styles/global.css rename to theme/index.css index ce6f0db..21be73a 100644 --- a/styles/global.css +++ b/theme/index.css @@ -17,8 +17,24 @@ /* margin-bottom: 80px; */ } +.author { + color: var(--rp-c-link); + font-weight: 500; + transition: color .25s; +} +.author:after { + content: "↗"; + margin-left: .2em; + margin-right: .1em; + font-size: .7em; + font-weight: 700; + transition: transform .2s; + display: inline-block; + transform: translate(0, -.3em); +} + @media (min-width: 768px) { - .md\:text-6xl { + .md\:rp-text-6xl { font-size: 2.50rem; line-height: 1; } diff --git a/theme/index.tsx b/theme/index.tsx new file mode 100644 index 0000000..991a314 --- /dev/null +++ b/theme/index.tsx @@ -0,0 +1,38 @@ +import { + Layout as BasicLayout, +} from '@rspress/core/theme'; +import { NavIcon } from '@rstack-dev/doc-ui/nav-icon'; + + +import './index.css' + + +const Layout = () => } + + bottom={ +
+

+ + 知识共享许可协议 +

+

Dora中文社区 © 2025 doracc.com

+

苏ICP备14007268号-19 | 苏公网安备32050602013520号

+

本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可

+
+ } + + beforeDocFooter={ +
+ {/*

知识共享许可协议

+

本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可

*/} +

作者: 李扬

+
+ } + + />; + +export { Layout }; + +export * from '@rspress/core/theme'; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 936218c..a45a102 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "useDefineForClassFields": true, "allowImportingTsExtensions": true }, - "include": ["docs", "theme", "rspress.config.ts"], + "include": ["docs", "theme", "rspress.config.ts", "components"], "mdx": { "checkMdx": true } diff --git a/yarn.lock b/yarn.lock index 5d709f0..db921fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -383,6 +383,13 @@ react-dom "^19.1.0" shiki "^3.8.1" +"@rstack-dev/doc-ui@^1.10.8": + version "1.10.8" + resolved "https://registry.yarnpkg.com/@rstack-dev/doc-ui/-/doc-ui-1.10.8.tgz#83ede7f1c966a2c0ca067b00c34ff30784cf0fb4" + integrity sha512-F/v0XzRI1ZIAzBBLx91um4TLMIUWw3LiQsPXtZe8ZAF6wQUVk47YPK/kB1VPkLLaD214JrwWq+L6P7UnD8MT7A== + dependencies: + framer-motion "^12.20.1" + "@selderee/plugin-htmlparser2@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz#d5b5e29a7ba6d3958a1972c7be16f4b2c188c517" @@ -873,6 +880,15 @@ flexsearch@0.7.43: resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.7.43.tgz#34f89b36278a466ce379c5bf6fb341965ed3f16c" integrity sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg== +framer-motion@^12.20.1: + version "12.23.9" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-12.23.9.tgz#f6567b57b9326c19224b25fbb7cd167e1e089d68" + integrity sha512-TqEHXj8LWfQSKqfdr5Y4mYltYLw96deu6/K9kGDd+ysqRJPNwF9nb5mZcrLmybHbU7gcJ+HQar41U3UTGanbbQ== + dependencies: + motion-dom "^12.23.9" + motion-utils "^12.23.6" + tslib "^2.4.0" + fs-extra@^11.3.0: version "11.3.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.0.tgz#0daced136bbaf65a555a326719af931adc7a314d" @@ -1182,9 +1198,9 @@ is-plain-obj@^4.0.0: integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== jiti@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.5.0.tgz#6e0f6c7d7fc7581312050072775dcb9e005caf15" - integrity sha512-NWDAhdnATItTnRhip9VTd8oXDjVcbhetRN6YzckApnXGxpGUooKMAaf0KVvlZG0+KlJMGkeLElVn4M1ReuxKUQ== + version "2.5.1" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.5.1.tgz#bd099c1c2be1c59bbea4e5adcd127363446759d0" + integrity sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w== js-yaml@^3.13.1: version "3.14.1" @@ -1796,6 +1812,18 @@ micromark@^4.0.0: micromark-util-symbol "^2.0.0" micromark-util-types "^2.0.0" +motion-dom@^12.23.9: + version "12.23.9" + resolved "https://registry.yarnpkg.com/motion-dom/-/motion-dom-12.23.9.tgz#f6768cdeb19c69f07c31083da12418d4e9f3e8c9" + integrity sha512-6Sv++iWS8XMFCgU1qwKj9l4xuC47Hp4+2jvPfyTXkqDg2tTzSgX6nWKD4kNFXk0k7llO59LZTPuJigza4A2K1A== + dependencies: + motion-utils "^12.23.6" + +motion-utils@^12.23.6: + version "12.23.6" + resolved "https://registry.yarnpkg.com/motion-utils/-/motion-utils-12.23.6.tgz#fafef80b4ea85122dd0d6c599a0c63d72881f312" + integrity sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ== + ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -2118,9 +2146,9 @@ shiki@3.8.1, shiki@^3.8.1: "@types/hast" "^3.0.4" source-map@^0.7.0: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + version "0.7.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.6.tgz#a3658ab87e5b6429c8a1f3ba0083d4c61ca3ef02" + integrity sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ== space-separated-tokens@^2.0.0: version "2.0.2"