diff --git a/website/docs/en/blog/index.mdx b/website/docs/en/blog/index.mdx index 4d25aa6f9..388b6ebc9 100644 --- a/website/docs/en/blog/index.mdx +++ b/website/docs/en/blog/index.mdx @@ -1,7 +1,6 @@ --- title: Overview sidebar: false -pageType: doc-wide --- # Rslib blogs diff --git a/website/docs/en/blog/introducing-rslib.mdx b/website/docs/en/blog/introducing-rslib.mdx index 1a1aa689e..5114161b4 100644 --- a/website/docs/en/blog/introducing-rslib.mdx +++ b/website/docs/en/blog/introducing-rslib.mdx @@ -1,7 +1,6 @@ --- date: 2025-05-14 10:00:00 sidebar: false -pageType: doc-wide --- _May 14, 2025_ diff --git a/website/docs/en/config/_meta.json b/website/docs/en/config/_meta.json index 57a840dbf..8bb1b9f50 100644 --- a/website/docs/en/config/_meta.json +++ b/website/docs/en/config/_meta.json @@ -1,17 +1,17 @@ [ { - "type": "file", - "name": "index", - "label": "Config Overview" + "type": "section-header", + "label": "Overview" }, + "index", { - "type": "dir", + "type": "dir-section-header", "name": "lib", - "label": "Lib Configurations" + "label": "Lib configurations" }, { - "type": "dir", + "type": "dir-section-header", "name": "rsbuild", - "label": "Rsbuild Configurations" + "label": "Rsbuild configurations" } ] diff --git a/website/docs/en/config/index.mdx b/website/docs/en/config/index.mdx index 0a97215eb..3ae0166e8 100644 --- a/website/docs/en/config/index.mdx +++ b/website/docs/en/config/index.mdx @@ -1,6 +1,12 @@ --- -overview: true -title: Config Overview +pageType: doc-wide +outline: false --- +# Config overview + This page lists all the configurations for Rslib. See [Configure Rslib](/guide/basic/configure-rslib) for detail. + +import Overview from '@components/Overview'; + + diff --git a/website/docs/en/config/lib/_meta.json b/website/docs/en/config/lib/_meta.json index a01f0aa0e..eecbd2023 100644 --- a/website/docs/en/config/lib/_meta.json +++ b/website/docs/en/config/lib/_meta.json @@ -1,17 +1,18 @@ [ - "format", - "bundle", + "index", "auto-extension", "auto-external", - "redirect", - "syntax", - "external-helpers", "banner", - "footer", + "bundle", "dts", - "shims", + "experiments", + "external-helpers", + "footer", + "format", "id", - "umd-name", "out-base", - "experiments" + "redirect", + "shims", + "syntax", + "umd-name" ] diff --git a/website/docs/en/config/lib/index.mdx b/website/docs/en/config/lib/index.mdx index 42fdb253a..96a36813b 100644 --- a/website/docs/en/config/lib/index.mdx +++ b/website/docs/en/config/lib/index.mdx @@ -1,20 +1,23 @@ -# Lib configurations +# Overview - **Type:** ```ts interface LibConfig extends EnvironmentConfig { - format?: Format; - bundle?: boolean; autoExtension?: boolean; autoExternal?: AutoExternal; - redirect?: Redirect; - syntax?: Syntax; - externalHelpers?: boolean; banner?: BannerAndFooter; + bundle?: boolean; + dts?: Dts; + experiments?: { advancedEsm?: boolean }; + externalHelpers?: boolean; footer?: BannerAndFooter; + format?: Format; + id?: string; + outBase?: string; + redirect?: Redirect; shims?: Shims; - dts?: Dts; + syntax?: Syntax; umdName?: Rspack.LibraryName; } diff --git a/website/docs/en/config/rsbuild/_meta.json b/website/docs/en/config/rsbuild/_meta.json index faa200631..b8729fd90 100644 --- a/website/docs/en/config/rsbuild/_meta.json +++ b/website/docs/en/config/rsbuild/_meta.json @@ -1,4 +1,5 @@ [ + "index", { "type": "file", "name": "log-level", diff --git a/website/docs/en/config/rsbuild/index.mdx b/website/docs/en/config/rsbuild/index.mdx index 1dfe277c5..9bb1a1484 100644 --- a/website/docs/en/config/rsbuild/index.mdx +++ b/website/docs/en/config/rsbuild/index.mdx @@ -1,15 +1,9 @@ import { RsbuildDocBadge } from '@components/RsbuildDocBadge'; -# Rsbuild configurations +# Overview Rslib inherits its configuration from Rsbuild, so you can also configure the options from Rsbuild. This chapter introduces some common configuration items and explains how to use them in Rslib. -:::tip -To learn more about Rslib configurations, check out [Configure Rslib](/guide/basic/configure-rslib). -::: - -## Overview - - [logLevel](/config/rsbuild/log-level): Specify the log level. - [resolve](/config/rsbuild/resolve): Options for module resolution. - [source](/config/rsbuild/source): Options for input source code. @@ -17,3 +11,7 @@ To learn more about Rslib configurations, check out [Configure Rslib](/guide/bas - [tools](/config/rsbuild/tools): Options for low-level tools. - [performance](/config/rsbuild/performance): Options for performance. - [plugins](/config/rsbuild/plugins): Configure Rsbuild plugins. + +:::tip +To learn more about Rslib configurations, check out [Configure Rslib](/guide/basic/configure-rslib). +::: diff --git a/website/docs/en/guide/_meta.json b/website/docs/en/guide/_meta.json index 9f1f4b21d..960e03405 100644 --- a/website/docs/en/guide/_meta.json +++ b/website/docs/en/guide/_meta.json @@ -1,31 +1,31 @@ [ { - "type": "dir", + "type": "dir-section-header", "name": "start", - "label": "Getting Started" + "label": "Start" }, { - "type": "dir", + "type": "dir-section-header", "name": "solution", "label": "Solution" }, { - "type": "dir", + "type": "dir-section-header", "name": "basic", "label": "Basic" }, { - "type": "dir", + "type": "dir-section-header", "name": "advanced", "label": "Advanced" }, { - "type": "dir", + "type": "dir-section-header", "name": "migration", "label": "Migration" }, { - "type": "dir", + "type": "dir-section-header", "name": "faq", "label": "FAQ" } diff --git a/website/docs/en/guide/solution/_meta.json b/website/docs/en/guide/solution/_meta.json index bf48fec55..6e2697479 100644 --- a/website/docs/en/guide/solution/_meta.json +++ b/website/docs/en/guide/solution/_meta.json @@ -1 +1 @@ -["nodejs", "react", "vue"] +["index", "nodejs", "react", "vue"] diff --git a/website/docs/en/guide/solution/index.mdx b/website/docs/en/guide/solution/index.mdx index 08aec6f06..ff7cbbf4a 100644 --- a/website/docs/en/guide/solution/index.mdx +++ b/website/docs/en/guide/solution/index.mdx @@ -1,4 +1,4 @@ -# Solution +# Overview In this chapter, we will introduce how to use Rslib to development libraries for browser and Node.js. We will also cover how to create libraries for different UI frameworks. diff --git a/website/docs/zh/blog/index.mdx b/website/docs/zh/blog/index.mdx index 7901a0de7..4eb5eae99 100644 --- a/website/docs/zh/blog/index.mdx +++ b/website/docs/zh/blog/index.mdx @@ -1,7 +1,6 @@ --- title: 总览 sidebar: false -pageType: doc-wide --- # Rslib 博客 diff --git a/website/docs/zh/blog/introducing-rslib.mdx b/website/docs/zh/blog/introducing-rslib.mdx index 8d397013a..3f9dc23c2 100644 --- a/website/docs/zh/blog/introducing-rslib.mdx +++ b/website/docs/zh/blog/introducing-rslib.mdx @@ -1,7 +1,6 @@ --- date: 2025-05-14 10:00:00 sidebar: false -pageType: doc-wide --- _2025 年 5 月 14 日_ diff --git a/website/docs/zh/config/_meta.json b/website/docs/zh/config/_meta.json index 67215f215..012db630f 100644 --- a/website/docs/zh/config/_meta.json +++ b/website/docs/zh/config/_meta.json @@ -1,16 +1,16 @@ [ { - "type": "file", - "name": "index", - "label": "配置总览" + "type": "section-header", + "label": "总览" }, + "index", { - "type": "dir", + "type": "dir-section-header", "name": "lib", "label": "Lib 配置" }, { - "type": "dir", + "type": "dir-section-header", "name": "rsbuild", "label": "Rsbuild 配置" } diff --git a/website/docs/zh/config/index.mdx b/website/docs/zh/config/index.mdx index 503af5c53..6093cedcf 100644 --- a/website/docs/zh/config/index.mdx +++ b/website/docs/zh/config/index.mdx @@ -1,6 +1,12 @@ --- -overview: true -title: 配置总览 +pageType: doc-wide +outline: false --- +# 配置总览 + 本页面列出了 Rslib 的所有配置项。详细配置请查阅 [配置 Rslib](/guide/basic/configure-rslib)。 + +import Overview from '@components/Overview'; + + diff --git a/website/docs/zh/config/lib/_meta.json b/website/docs/zh/config/lib/_meta.json index a01f0aa0e..eecbd2023 100644 --- a/website/docs/zh/config/lib/_meta.json +++ b/website/docs/zh/config/lib/_meta.json @@ -1,17 +1,18 @@ [ - "format", - "bundle", + "index", "auto-extension", "auto-external", - "redirect", - "syntax", - "external-helpers", "banner", - "footer", + "bundle", "dts", - "shims", + "experiments", + "external-helpers", + "footer", + "format", "id", - "umd-name", "out-base", - "experiments" + "redirect", + "shims", + "syntax", + "umd-name" ] diff --git a/website/docs/zh/config/lib/index.mdx b/website/docs/zh/config/lib/index.mdx index 875599c50..343ed4c54 100644 --- a/website/docs/zh/config/lib/index.mdx +++ b/website/docs/zh/config/lib/index.mdx @@ -1,20 +1,23 @@ -# Lib 配置 +# 总览 - **类型:** ```ts interface LibConfig extends EnvironmentConfig { - format?: Format; - bundle?: boolean; autoExtension?: boolean; autoExternal?: AutoExternal; - redirect?: Redirect; - syntax?: Syntax; - externalHelpers?: boolean; banner?: BannerAndFooter; + bundle?: boolean; + dts?: Dts; + experiments?: { advancedEsm?: boolean }; + externalHelpers?: boolean; + format?: Format; + id?: string; + outBase?: string; footer?: BannerAndFooter; + redirect?: Redirect; shims?: Shims; - dts?: Dts; + syntax?: Syntax; umdName?: Rspack.LibraryName; } diff --git a/website/docs/zh/config/rsbuild/_meta.json b/website/docs/zh/config/rsbuild/_meta.json index faa200631..b8729fd90 100644 --- a/website/docs/zh/config/rsbuild/_meta.json +++ b/website/docs/zh/config/rsbuild/_meta.json @@ -1,4 +1,5 @@ [ + "index", { "type": "file", "name": "log-level", diff --git a/website/docs/zh/config/rsbuild/index.mdx b/website/docs/zh/config/rsbuild/index.mdx index be1c18653..2380f8a94 100644 --- a/website/docs/zh/config/rsbuild/index.mdx +++ b/website/docs/zh/config/rsbuild/index.mdx @@ -1,15 +1,9 @@ import { RsbuildDocBadge } from '@components/RsbuildDocBadge'; -# Rsbuild 配置 +# 总览 Rslib 继承了 Rsbuild 的配置,所以你也可以配置 选项。本章节介绍了一些常见的配置项,并解释了如何在 Rslib 中使用它们。 -:::tip -要了解更多关于 Rslib 的配置,请查看 [Configure Rslib](/guide/basic/configure-rslib)。 -::: - -## 概览 - - [logLevel](/config/rsbuild/log-level): 指定日志级别。 - [resolve](/config/rsbuild/resolve): 与模块解析相关的选项。 - [source](/config/rsbuild/source): 与输入的源代码相关的选项。 @@ -17,3 +11,7 @@ Rslib 继承了 Rsbuild 的配置,所以你也可以配置 ( -
-
-

{group.name}

-
    - {group.items.map((item) => ( -
  • - {item.text} -
  • - ))} -
-
-
- )); + const group: Group = { + name: '', + items: OVERVIEW_GROUPS.map((item) => ({ + text: item.name, + link: tUrl(item.link), + items: item.items.map(({ link, text }) => { + return { + link: tUrl(link), + text, + }; + }), + })), + }; - return
{Nodes}
; + return ; } diff --git a/website/theme/index.scss b/website/theme/index.scss index 8f65735d0..d1bcf06df 100644 --- a/website/theme/index.scss +++ b/website/theme/index.scss @@ -11,3 +11,11 @@ .dark { --rp-c-link: var(--rp-c-brand-light); } + +/* Simulate the centering behavior when sidebar: false */ +/* Avoid having the visual center too far to the right */ +@media (min-width: 1280px) { + .rp-doc-layout__sidebar-placeholder { + width: 10vw !important; + } +}