From ebef79cf30bfa2613a763e4589081e5e7bebf15a Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Fri, 5 Apr 2024 20:05:58 +0800 Subject: [PATCH] docs: add support for RSS --- .../docs/en/community/releases/v0-1.mdx | 4 + .../docs/en/community/releases/v0-2.mdx | 4 + .../docs/en/community/releases/v0-3.mdx | 4 + .../docs/en/community/releases/v0-4.mdx | 4 + .../docs/en/community/releases/v0-5.mdx | 4 + .../docs/zh/community/releases/v0-1.mdx | 4 + .../docs/zh/community/releases/v0-2.mdx | 4 + .../docs/zh/community/releases/v0-3.mdx | 4 + .../docs/zh/community/releases/v0-4.mdx | 4 + .../docs/zh/community/releases/v0-5.mdx | 4 + packages/document/package.json | 8 +- packages/document/rspress.config.ts | 22 +++- pnpm-lock.yaml | 117 ++++++++++++------ 13 files changed, 146 insertions(+), 41 deletions(-) diff --git a/packages/document/docs/en/community/releases/v0-1.mdx b/packages/document/docs/en/community/releases/v0-1.mdx index 5e22d5b75e..75de3be1d3 100644 --- a/packages/document/docs/en/community/releases/v0-1.mdx +++ b/packages/document/docs/en/community/releases/v0-1.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2023-11-22 08:00:00 +--- + # Announcing Rsbuild v0.1 > November 22, 2023 diff --git a/packages/document/docs/en/community/releases/v0-2.mdx b/packages/document/docs/en/community/releases/v0-2.mdx index 655d5edad1..7d3b9bfaf8 100644 --- a/packages/document/docs/en/community/releases/v0-2.mdx +++ b/packages/document/docs/en/community/releases/v0-2.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2023-12-11 08:00:00 +--- + # Announcing Rsbuild v0.2 > December 11, 2023 diff --git a/packages/document/docs/en/community/releases/v0-3.mdx b/packages/document/docs/en/community/releases/v0-3.mdx index c9b979d767..d9e67487ac 100644 --- a/packages/document/docs/en/community/releases/v0-3.mdx +++ b/packages/document/docs/en/community/releases/v0-3.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2024-01-10 08:00:00 +--- + # Announcing Rsbuild v0.3 > January 10, 2024 diff --git a/packages/document/docs/en/community/releases/v0-4.mdx b/packages/document/docs/en/community/releases/v0-4.mdx index 311ebefdbf..f767d606aa 100644 --- a/packages/document/docs/en/community/releases/v0-4.mdx +++ b/packages/document/docs/en/community/releases/v0-4.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2024-02-06 08:00:00 +--- + # Announcing Rsbuild v0.4 > February 06, 2024 diff --git a/packages/document/docs/en/community/releases/v0-5.mdx b/packages/document/docs/en/community/releases/v0-5.mdx index 1ff93b8918..e23515e908 100644 --- a/packages/document/docs/en/community/releases/v0-5.mdx +++ b/packages/document/docs/en/community/releases/v0-5.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2024-03-19 08:00:00 +--- + # Announcing Rsbuild v0.5 > March 19, 2024 diff --git a/packages/document/docs/zh/community/releases/v0-1.mdx b/packages/document/docs/zh/community/releases/v0-1.mdx index bc8dfc5c29..945eb81f92 100644 --- a/packages/document/docs/zh/community/releases/v0-1.mdx +++ b/packages/document/docs/zh/community/releases/v0-1.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2023-11-22 08:00:00 +--- + # Rsbuild v0.1 发布 > November 22, 2023 diff --git a/packages/document/docs/zh/community/releases/v0-2.mdx b/packages/document/docs/zh/community/releases/v0-2.mdx index 2f2fd2f70c..eff25bd02b 100644 --- a/packages/document/docs/zh/community/releases/v0-2.mdx +++ b/packages/document/docs/zh/community/releases/v0-2.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2023-12-11 08:00:00 +--- + # Rsbuild v0.2 发布 > December 11, 2023 diff --git a/packages/document/docs/zh/community/releases/v0-3.mdx b/packages/document/docs/zh/community/releases/v0-3.mdx index 78eb04a299..122162c85c 100644 --- a/packages/document/docs/zh/community/releases/v0-3.mdx +++ b/packages/document/docs/zh/community/releases/v0-3.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2024-01-10 08:00:00 +--- + # Rsbuild v0.3 发布 > January 10, 2024 diff --git a/packages/document/docs/zh/community/releases/v0-4.mdx b/packages/document/docs/zh/community/releases/v0-4.mdx index a4e4bf30da..dd64213caa 100644 --- a/packages/document/docs/zh/community/releases/v0-4.mdx +++ b/packages/document/docs/zh/community/releases/v0-4.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2024-02-06 08:00:00 +--- + # Rsbuild v0.4 发布 > February 06, 2024 diff --git a/packages/document/docs/zh/community/releases/v0-5.mdx b/packages/document/docs/zh/community/releases/v0-5.mdx index 09e81553f5..e13bcb440b 100644 --- a/packages/document/docs/zh/community/releases/v0-5.mdx +++ b/packages/document/docs/zh/community/releases/v0-5.mdx @@ -1,3 +1,7 @@ +--- +published_at: 2024-03-19 08:00:00 +--- + # Rsbuild v0.5 发布 > March 19, 2024 diff --git a/packages/document/package.json b/packages/document/package.json index f320869b01..9577e0d306 100644 --- a/packages/document/package.json +++ b/packages/document/package.json @@ -22,16 +22,18 @@ }, "devDependencies": { "@rsbuild/core": "workspace:*", + "@rspress/plugin-rss": "^1.17.0", + "@rspress/runtime": "^1.17.0", "@types/node": "16.x", "@types/react": "^18.2.71", "@types/react-dom": "^18.2.22", "fast-glob": "^3.3.2", - "rsbuild-plugin-google-analytics": "1.0.0", - "rsbuild-plugin-open-graph": "1.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "rsbuild-plugin-google-analytics": "1.0.0", + "rsbuild-plugin-open-graph": "1.0.0", "rsfamily-nav-icon": "^1.0.2", - "rspress": "^1.16.1", + "rspress": "^1.17.0", "rspress-plugin-font-open-sans": "1.0.0" }, "publishConfig": { diff --git a/packages/document/rspress.config.ts b/packages/document/rspress.config.ts index a6d7ed08a1..1de4f17035 100644 --- a/packages/document/rspress.config.ts +++ b/packages/document/rspress.config.ts @@ -1,12 +1,32 @@ import path from 'node:path'; import { defineConfig } from 'rspress/config'; import { rsbuildPluginOverview } from './src/rsbuildPluginOverview'; +import { pluginRss } from '@rspress/plugin-rss'; import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans'; import { pluginOpenGraph } from 'rsbuild-plugin-open-graph'; import { pluginGoogleAnalytics } from 'rsbuild-plugin-google-analytics'; export default defineConfig({ - plugins: [pluginFontOpenSans()], + plugins: [ + pluginFontOpenSans(), + pluginRss({ + siteUrl: 'https://rsbuild.dev', + feed: [ + { + id: 'releases', + test: '/community/releases/v', + title: 'Rsbuild Releases', + language: 'en-US', + }, + { + id: 'releases-zh', + test: '/zh/community/releases/v', + title: 'Rsbuild Releases', + language: 'zh-CN', + }, + ], + }), + ], root: path.join(__dirname, 'docs'), lang: 'en', base: '/', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1f6c1a8124..6ad1f4b378 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -745,6 +745,12 @@ importers: '@rsbuild/core': specifier: link:../core version: link:../core + '@rspress/plugin-rss': + specifier: ^1.17.0 + version: 1.17.0(@rspress/runtime@1.17.0)(@types/react@18.2.71)(react@18.2.0) + '@rspress/runtime': + specifier: ^1.17.0 + version: 1.17.0 '@types/node': specifier: 16.x version: 16.18.84 @@ -773,8 +779,8 @@ importers: specifier: ^1.0.2 version: 1.0.2 rspress: - specifier: ^1.16.1 - version: 1.16.1(webpack@5.91.0) + specifier: ^1.17.0 + version: 1.17.0(webpack@5.91.0) rspress-plugin-font-open-sans: specifier: 1.0.0 version: 1.0.0 @@ -4285,6 +4291,15 @@ packages: rslog: 1.2.1 dev: true + /@modern-js/utils@2.48.4: + resolution: {integrity: sha512-ummxga/VKrQjh8TdWtxckx9hefMKfe6cxY1fpDmn5wOkJbNpLS2GIlEFPDhlN451JyeMDD9kbxRedq4ETE+NqQ==} + dependencies: + '@swc/helpers': 0.5.3 + caniuse-lite: 1.0.30001600 + lodash: 4.17.21 + rslog: 1.2.1 + dev: true + /@module-federation/runtime-tools@0.0.8: resolution: {integrity: sha512-tqx3wlVHnpWLk+vn22c0x9Nv1BqdZnoS6vdMb53IsVpbQIFP70nhhvymHUyFuPkoLzMFidS7GpG58DYT/4lvCw==} dependencies: @@ -4823,25 +4838,25 @@ packages: react-refresh: 0.14.0 dev: false - /@rspress/core@1.16.1(webpack@5.91.0): - resolution: {integrity: sha512-wo5SRlIJDS+6uWHvSF6q3cUhnN+kz7hiGIqMP9k87CKrzXeT4HHR6sV7D/zCQlxzkaJ+1egQypPk4mZuZ+ZWBQ==} + /@rspress/core@1.17.0(webpack@5.91.0): + resolution: {integrity: sha512-Ts9CnTfjvuMD8UEgvPcIXLCYpzh2qbGUjOfAnocVSgQyJs/K5b3WrwJeM33OsIrMbIBKVersi0tWqTXOyX89NA==} engines: {node: '>=14.17.6'} dependencies: '@loadable/component': 5.15.2(react@18.2.0) '@mdx-js/loader': 2.3.0(webpack@5.91.0) '@mdx-js/mdx': 2.3.0 '@mdx-js/react': 2.3.0(react@18.2.0) - '@modern-js/utils': 2.48.3 + '@modern-js/utils': 2.48.4 '@rsbuild/core': link:packages/core '@rsbuild/plugin-react': link:packages/plugin-react '@rspress/mdx-rs': 0.5.1 - '@rspress/plugin-auto-nav-sidebar': 1.16.1 - '@rspress/plugin-container-syntax': 1.16.1 - '@rspress/plugin-last-updated': 1.16.1 - '@rspress/plugin-medium-zoom': 1.16.1(@rspress/runtime@1.16.1) - '@rspress/runtime': 1.16.1 - '@rspress/shared': 1.16.1 - '@rspress/theme-default': 1.16.1 + '@rspress/plugin-auto-nav-sidebar': 1.17.0 + '@rspress/plugin-container-syntax': 1.17.0 + '@rspress/plugin-last-updated': 1.17.0 + '@rspress/plugin-medium-zoom': 1.17.0(@rspress/runtime@1.17.0) + '@rspress/runtime': 1.17.0 + '@rspress/shared': 1.17.0 + '@rspress/theme-default': 1.17.0 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 enhanced-resolve: 5.12.0 @@ -4967,50 +4982,64 @@ packages: '@rspress/mdx-rs-win32-x64-msvc': 0.5.1 dev: true - /@rspress/plugin-auto-nav-sidebar@1.16.1: - resolution: {integrity: sha512-xaF/6tzznIm8yPA1Ud8LuVK67/m24CWZXy6HaAWZqjtm1kCAFwmw65a1KYTGVnxW0+vyFBGiHVER5KNbZL//7g==} + /@rspress/plugin-auto-nav-sidebar@1.17.0: + resolution: {integrity: sha512-8lF21+GO3hAPp1VwP261Kj5Lu22M7vQ9yb9CmFE9QCHkXiUiRAWMNKej8URqyMwNecVsQOX9bZc02lp8lUoKog==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.16.1 + '@rspress/shared': 1.17.0 dev: true - /@rspress/plugin-container-syntax@1.16.1: - resolution: {integrity: sha512-/B0vGI8mzQ9pTF67WIsooDLw8YizRC8yAHPyc9xT3JZXex8D/CUcj8TLC3fuspMEWqFuA5fdD1Em6rmLzoX5Qw==} + /@rspress/plugin-container-syntax@1.17.0: + resolution: {integrity: sha512-xl8KwCpwKB5ozCHu8lewj8TA+XJl0dW5oGWlmTevJvrQ7yzwvIiLSdG0lYZ9fwE3+hSpTQPHQXt0CwX3lA7v/Q==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.16.1 + '@rspress/shared': 1.17.0 dev: true - /@rspress/plugin-last-updated@1.16.1: - resolution: {integrity: sha512-lon+6lVpXdBgsOOYAgX966VehR8cLsLe50gY+m0YhjhEWlLJuDxb0fEfGF70ibxbHTj9H0MHXQZg965rCkbg4g==} + /@rspress/plugin-last-updated@1.17.0: + resolution: {integrity: sha512-4Cwa+HJooi+pkq3yKfAYVuz7xcT3xCA3Hr0owW225X7h7xYEGEC3kLuLZsmOO4Js68m+R3j/chu6oSn/iew12g==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.16.1 + '@rspress/shared': 1.17.0 dev: true - /@rspress/plugin-medium-zoom@1.16.1(@rspress/runtime@1.16.1): - resolution: {integrity: sha512-2kvpZiV4yzNu43bObmoO5PzlSs1koShpZ4Aef7BQJLQvyZoYC/ms05Fd7k5xA6jFqXLNyQP5n3cWBv9Hu0B3Og==} + /@rspress/plugin-medium-zoom@1.17.0(@rspress/runtime@1.17.0): + resolution: {integrity: sha512-hgqNYhwDSiy4OEmMH2TaPegieLDGAKCBRZyZYvF68TA9gosYJaPcRf7GSAOf8xN5Y0ULlgWc2a65fzwCG1pnOw==} engines: {node: '>=14.17.6'} peerDependencies: '@rspress/runtime': ^1.0.2 dependencies: - '@rspress/runtime': 1.16.1 + '@rspress/runtime': 1.17.0 medium-zoom: 1.0.8 dev: true - /@rspress/runtime@1.16.1: - resolution: {integrity: sha512-DVqNY4I400QZENi/07ftlDgUNF+fNO/nnq2So4r8Lf9+T+fKtjcwuXNnDGYfkqjPGWvyRzmroQY42ukYqhfIVA==} + /@rspress/plugin-rss@1.17.0(@rspress/runtime@1.17.0)(@types/react@18.2.71)(react@18.2.0): + resolution: {integrity: sha512-ArbKpJpmFT4eteFvA9j/1zbeK9zB25smurgNWEoaY3T+mhXdXa9CIoJLGA1yeghJnbPvkmGvMu7FkjXeCKen5g==} + engines: {node: '>=14.17.6'} + peerDependencies: + '@rspress/runtime': ^1.0.0 + '@types/react': '>=17.0.0' + react: '>=17.0.0' + dependencies: + '@rspress/runtime': 1.17.0 + '@types/react': 18.2.71 + feed: 4.2.2 + react: 18.2.0 + dev: true + + /@rspress/runtime@1.17.0: + resolution: {integrity: sha512-6BOSwtMl7QRG8vdU6ecxpEIf+F2R9KxPG01Cxh6P4YAeGBVtyYDtOMSxs3FEH3t68Ermlj4/fP2iS57b9OwxEA==} engines: {node: '>=14.17.6'} dependencies: - '@rspress/shared': 1.16.1 + '@rspress/shared': 1.17.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-helmet-async: 1.3.0(react-dom@18.2.0)(react@18.2.0) react-router-dom: 6.22.3(react-dom@18.2.0)(react@18.2.0) dev: true - /@rspress/shared@1.16.1: - resolution: {integrity: sha512-/wAtWlP8O7710hN9PktggFRgYj8vxzs+E/lOxvIAGjosnrDf4RYKrXAN47u9VrMmMfamY34DITDMgGOfW55dOg==} + /@rspress/shared@1.17.0: + resolution: {integrity: sha512-6BydgHHzmcajJbs0LUzAZPPx+ROSKg6XvristHBrkK++so9mg1DoiWkNCMurIhGC+fQsKZ+50udOjoCHNVON/g==} dependencies: '@rsbuild/core': link:packages/core chalk: 4.1.2 @@ -5020,13 +5049,13 @@ packages: unified: 10.1.2 dev: true - /@rspress/theme-default@1.16.1: - resolution: {integrity: sha512-Zp5kFG/6l6sVA3xW5nH1ptGuvjiYNwh8M1lhN4ovcStJhEeqyQaiJ3p2AJ6cqzCXoTF13Z1yxjzjG1GWesFGSA==} + /@rspress/theme-default@1.17.0: + resolution: {integrity: sha512-iwX+H6gwrEbAzYa+gHT7/FlcH1bC0RHw7pVRdhvQfgufqN5UWaQwC4puGAIHFWQ7+BulNTEzb9M7nRLzzLLGbg==} engines: {node: '>=14.17.6'} dependencies: '@mdx-js/react': 2.3.0(react@18.2.0) - '@rspress/runtime': 1.16.1 - '@rspress/shared': 1.16.1 + '@rspress/runtime': 1.17.0 + '@rspress/shared': 1.17.0 body-scroll-lock: 4.0.0-beta.0 copy-to-clipboard: 3.3.3 flexsearch: 0.6.32 @@ -8159,6 +8188,13 @@ packages: format: 0.2.2 dev: true + /feed@4.2.2: + resolution: {integrity: sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==} + engines: {node: '>=0.4.0'} + dependencies: + xml-js: 1.6.11 + dev: true + /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -12875,13 +12911,13 @@ packages: resolution: {integrity: sha512-4GP0pd7h3W8EWdqE0VkA62nzUJZNy4ZnYK7be8+lOKHQKsQ5nZ+22A/VurNssi1eZFx3kjwbmIuoAkgb5W8S9Q==} dev: true - /rspress@1.16.1(webpack@5.91.0): - resolution: {integrity: sha512-mJ075S7XSh2OX12n6lFrAxbYq5Xq494lBWenrolEoCZsRut5JxZCZoTcKfu7uEJuXKDoubDz/hVSW+1xwGn4pA==} + /rspress@1.17.0(webpack@5.91.0): + resolution: {integrity: sha512-Qa7gTPL0utOPA6zAxob87bi69hJv3/OCczGUEt+9U7OTH4vknUQr3ANpieXLLFZq7tQKhLrbYvLvhAZ9yd2M6A==} hasBin: true dependencies: '@rsbuild/core': link:packages/core - '@rspress/core': 1.16.1(webpack@5.91.0) - '@rspress/shared': 1.16.1 + '@rspress/core': 1.17.0(webpack@5.91.0) + '@rspress/shared': 1.17.0 cac: 6.7.14 chalk: 5.3.0 chokidar: 3.6.0 @@ -14828,6 +14864,13 @@ packages: optional: true dev: true + /xml-js@1.6.11: + resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} + hasBin: true + dependencies: + sax: 1.3.0 + dev: true + /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'}