From 79aac5e0c361cbd4c1fcbefe1c5d5e97ffa3518c Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 16 Nov 2026 14:18:38 +0800 Subject: [PATCH 1/2] docs: add blog list and introductory post scaffold --- website/docs/en/_nav.json | 5 ++ website/docs/en/blog/_meta.json | 1 + website/docs/en/blog/index.mdx | 9 +++ .../docs/en/blog/introducing-rstack-cli.mdx | 16 ++++++ website/docs/zh/_nav.json | 5 ++ website/docs/zh/blog/_meta.json | 1 + website/docs/zh/blog/index.mdx | 9 +++ .../docs/zh/blog/introducing-rstack-cli.mdx | 16 ++++++ website/theme/components/BlogList.tsx | 55 +++++++++++++++++++ website/theme/index.tsx | 32 ++++++++++- 10 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 website/docs/en/blog/_meta.json create mode 100644 website/docs/en/blog/index.mdx create mode 100644 website/docs/en/blog/introducing-rstack-cli.mdx create mode 100644 website/docs/zh/blog/_meta.json create mode 100644 website/docs/zh/blog/index.mdx create mode 100644 website/docs/zh/blog/introducing-rstack-cli.mdx create mode 100644 website/theme/components/BlogList.tsx diff --git a/website/docs/en/_nav.json b/website/docs/en/_nav.json index e5db6bcd..c75aab87 100644 --- a/website/docs/en/_nav.json +++ b/website/docs/en/_nav.json @@ -4,6 +4,11 @@ "link": "/guide/quick-start", "activeMatch": "/guide/" }, + { + "text": "Blog", + "link": "/blog/", + "activeMatch": "/blog/" + }, { "text": "Changelog", "link": "https://github.com/rstackjs/rstack-cli/releases" diff --git a/website/docs/en/blog/_meta.json b/website/docs/en/blog/_meta.json new file mode 100644 index 00000000..7f5a7c7d --- /dev/null +++ b/website/docs/en/blog/_meta.json @@ -0,0 +1 @@ +["index", "introducing-rstack-cli"] diff --git a/website/docs/en/blog/index.mdx b/website/docs/en/blog/index.mdx new file mode 100644 index 00000000..eb9b7a05 --- /dev/null +++ b/website/docs/en/blog/index.mdx @@ -0,0 +1,9 @@ +--- +title: Rstack CLI blogs +description: 'Blog posts about Rstack CLI.' +sidebar: false +--- + +import { BlogList } from '../../../theme/components/BlogList'; + + diff --git a/website/docs/en/blog/introducing-rstack-cli.mdx b/website/docs/en/blog/introducing-rstack-cli.mdx new file mode 100644 index 00000000..48c88ca0 --- /dev/null +++ b/website/docs/en/blog/introducing-rstack-cli.mdx @@ -0,0 +1,16 @@ +--- +date: 2026-11-17 +sidebar: false +authors: + - name: chenjiahan + avatar: 'https://github.com/chenjiahan.png' + github: 'chenjiahan' +--- + +import { BlogAuthors } from '@rstackjs/doc-ui/blog-authors'; + +# Introducing Rstack CLI + +_November 17, 2026_ + + diff --git a/website/docs/zh/_nav.json b/website/docs/zh/_nav.json index b1d56dcc..7e1abfa5 100644 --- a/website/docs/zh/_nav.json +++ b/website/docs/zh/_nav.json @@ -4,6 +4,11 @@ "link": "/guide/quick-start", "activeMatch": "/guide/" }, + { + "text": "博客", + "link": "/blog/", + "activeMatch": "/blog/" + }, { "text": "更新日志", "link": "https://github.com/rstackjs/rstack-cli/releases" diff --git a/website/docs/zh/blog/_meta.json b/website/docs/zh/blog/_meta.json new file mode 100644 index 00000000..7f5a7c7d --- /dev/null +++ b/website/docs/zh/blog/_meta.json @@ -0,0 +1 @@ +["index", "introducing-rstack-cli"] diff --git a/website/docs/zh/blog/index.mdx b/website/docs/zh/blog/index.mdx new file mode 100644 index 00000000..d4fdcff8 --- /dev/null +++ b/website/docs/zh/blog/index.mdx @@ -0,0 +1,9 @@ +--- +title: Rstack CLI 博客 +description: '与 Rstack CLI 相关的博客文章。' +sidebar: false +--- + +import { BlogList } from '../../../theme/components/BlogList'; + + diff --git a/website/docs/zh/blog/introducing-rstack-cli.mdx b/website/docs/zh/blog/introducing-rstack-cli.mdx new file mode 100644 index 00000000..4b6e8aa6 --- /dev/null +++ b/website/docs/zh/blog/introducing-rstack-cli.mdx @@ -0,0 +1,16 @@ +--- +date: 2026-11-17 +sidebar: false +authors: + - name: chenjiahan + avatar: 'https://github.com/chenjiahan.png' + github: 'chenjiahan' +--- + +import { BlogAuthors } from '@rstackjs/doc-ui/blog-authors'; + +# Rstack CLI 介绍 \{#introducing-rstack-cli} + +_2026 年 11 月 17 日_ + + diff --git a/website/theme/components/BlogList.tsx b/website/theme/components/BlogList.tsx new file mode 100644 index 00000000..5fcf4e81 --- /dev/null +++ b/website/theme/components/BlogList.tsx @@ -0,0 +1,55 @@ +import { useLang, usePages } from '@rspress/core/runtime'; +import { Link, renderInlineMarkdown } from '@rspress/core/theme'; +import type { BlogAvatarAuthor } from '@rstackjs/doc-ui/blog-avatar'; +import { BlogBackground } from '@rstackjs/doc-ui/blog-background'; +import { + BlogList as BaseBlogList, + type BlogListItem, +} from '@rstackjs/doc-ui/blog-list'; + +type BlogFrontmatter = { + description?: string; + date?: string; + authors?: BlogAvatarAuthor[]; +}; + +const getDateValue = (date?: BlogListItem['date']): number => { + const timestamp = date ? new Date(date).getTime() : 0; + return Number.isNaN(timestamp) ? 0 : timestamp; +}; + +export function BlogList() { + const { pages } = usePages(); + const lang = useLang(); + const posts = pages + .filter( + (page) => + page.lang === lang && + page.routePath.includes('/blog/') && + !page.routePath.endsWith('/blog/'), + ) + .map((page): BlogListItem => { + const frontmatter = (page.frontmatter ?? {}) as BlogFrontmatter; + + return { + title: page.title, + description: frontmatter.description, + date: frontmatter.date, + href: page.routePath, + authors: frontmatter.authors, + }; + }) + .sort((a, b) => getDateValue(b.date) - getDateValue(a.date)); + + return ( + <> + + + + ); +} diff --git a/website/theme/index.tsx b/website/theme/index.tsx index d9f07d14..2d7cac73 100644 --- a/website/theme/index.tsx +++ b/website/theme/index.tsx @@ -1,4 +1,11 @@ -import { Layout as BaseLayout } from '@rspress/core/theme-original'; +import { useLang, usePage } from '@rspress/core/runtime'; +import { + Layout as BaseLayout, + DocLayout as BaseDocLayout, + Link, + type DocLayoutProps, +} from '@rspress/core/theme-original'; +import { BlogBackButton } from '@rstackjs/doc-ui/blog-back-button'; import { NavIcon } from '@rstackjs/doc-ui/nav-icon'; import { HomeLayout } from './pages'; import '@rstackjs/doc-ui/theme.css'; @@ -6,6 +13,27 @@ import './index.scss'; const Layout = () => } />; -export { HomeLayout, Layout }; +const DocLayout = (props: DocLayoutProps) => { + const { page } = usePage(); + const lang = useLang(); + + return ( + + + {props.beforeDocContent} + + } + /> + ); +}; + +export { DocLayout, HomeLayout, Layout }; export * from '@rspress/core/theme-original'; From 8c0338c293f6ae30781b89434d5dba0e3de59c3a Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 25 Nov 2026 11:37:01 +0800 Subject: [PATCH 2/2] docs: update --- scripts/dictionary.txt | 1 + .../docs/zh/blog/introducing-rstack-cli.mdx | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/scripts/dictionary.txt b/scripts/dictionary.txt index 0ccff542..2d4267e1 100644 --- a/scripts/dictionary.txt +++ b/scripts/dictionary.txt @@ -25,6 +25,7 @@ oxfmt precheck quasis rsbuild +Rsdoctor rslib rslint rslog diff --git a/website/docs/zh/blog/introducing-rstack-cli.mdx b/website/docs/zh/blog/introducing-rstack-cli.mdx index 4b6e8aa6..d451e3fd 100644 --- a/website/docs/zh/blog/introducing-rstack-cli.mdx +++ b/website/docs/zh/blog/introducing-rstack-cli.mdx @@ -14,3 +14,21 @@ import { BlogAuthors } from '@rstackjs/doc-ui/blog-authors'; _2026 年 11 月 17 日_ + +我们很高兴地宣布 [Rstack CLI](https://github.com/rstackjs/rstack-cli) 正式发布! + +Rstack CLI 是一个为 JavaScript 开发者和 Agents 设计的统一命令行工具,内置开发、构建、测试、代码检查、格式化等能力,旨在简化 JavaScript 项目的开发流程,并提供统一的体验。 + +## Rstack 的诞生 + +回望 2022 年,为了解决字节跳动内部 webpack 项目的构建性能问题,我们开发了 [Rspack](https://rspack.rs/),一个基于 Rust 编写的高性能打包工具,并在 2023 年初将它开源。Rspack 兼顾了性能、产物质量和迁移成本,因此很快获得了社区的关注,并逐渐被微软、OpenAI、DeepSeek 等公司采用,npm 周下载量也增长到一千多万次。 + +随着构建性能问题得到缓解,另一个不可忽视的问题是 webpack 高昂的配置成本。在 2023 至 2024 年,我们基于 Rspack 陆续开发了 [Rsbuild](https://rsbuild.rs/)、[Rslib](https://rslib.rs/) 和 [Rspress](https://rspress.rs/)。它们将复杂的打包配置封装在工具内部,分别为应用开发、库开发和文档站点提供开箱即用的支持。 + +随着 Agentic Coding 的流行,我们希望打造更可靠的工具,为 Agent 的开发过程建立质量约束。因此我们继续开发了构建分析工具 [Rsdoctor](https://rsdoctor.rs/),测试框架 [Rstest](https://rstest.rs/),以及代码检查工具 [Rslint](https://rslint.rs/)。它们能和其他工具相互配合,提供更连贯的开发体验。例如,Rstest 可以复用 Rsbuild 的配置和插件,Rslint 则内置了针对 Rstest 测试代码的 lint 规则。 + +所有这些工具共同组成了 Rstack —— + +![](https://assets.rspack.rs/rstack/rstack-overview-dark-zh.png) + +## 从独立工具到统一 CLI