📝 ♻️ changelog split

This commit is contained in:
StarHeartHunt 2024-09-16 08:53:37 +08:00
parent 021ad92707
commit 751d6d45bb
7 changed files with 26 additions and 4 deletions

View File

@ -40,7 +40,7 @@ jobs:
- name: Update Changelog
uses: docker://ghcr.io/nonebot/auto-changelog:master
with:
changelog_file: website/src/pages/changelog.md
changelog_file: website/src/changelog/changelog.md
latest_changes_position: '# 更新日志\n\n'
latest_changes_title: "## 最近更新"
replace_regex: '(?<=## 最近更新\n)[\s\S]*?(?=\n## )'

View File

@ -32,7 +32,7 @@ jobs:
- name: Archive Changelog
uses: docker://ghcr.io/nonebot/auto-changelog:master
with:
changelog_file: website/src/pages/changelog.md
changelog_file: website/src/changelog/changelog.md
archive_regex: '(?<=## )最近更新(?=\n)'
archive_title: ${{ env.TAG_NAME }}
commit_and_push: false

View File

@ -1,3 +1,3 @@
# Changelog
See [changelog.md](./website/src/pages/changelog.md) or <https://nonebot.dev/changelog>
See [changelog.md](./website/src/changelog/changelog.md) or <https://nonebot.dev/changelog>

View File

@ -1,4 +1,5 @@
import type { Config } from "@docusaurus/types";
import type { Options as ChangelogOptions } from "@nullbot/docusaurus-plugin-changelog";
import type * as Preset from "@nullbot/docusaurus-preset-nonepress";
import { themes } from "prism-react-renderer";
@ -327,7 +328,17 @@ export default async function createConfigAsync() {
}),
},
plugins: [require("./src/plugins/webpack-plugin.ts")],
plugins: [
require("./src/plugins/webpack-plugin.ts"),
[
"@nullbot/docusaurus-plugin-changelog",
{
changelogPath: "website/src/pages/changelog.md",
changelogHeader: `description: Changelog
toc_max_heading_level: 2`,
} satisfies ChangelogOptions,
],
],
markdown: {
mdx1Compat: {

View File

@ -24,6 +24,7 @@
"dependencies": {
"@docusaurus/core": "^3.5.2",
"@mdx-js/react": "^3.0.0",
"@nullbot/docusaurus-plugin-changelog": "^3.0.0",
"@nullbot/docusaurus-preset-nonepress": "^3.0.0",
"@swc/core": "^1.7.26",
"clsx": "^2.0.0",

View File

@ -1915,6 +1915,16 @@
resolved "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz#3dc35ba0f1e66b403c00b39344f870298ebb1c8e"
integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==
"@nullbot/docusaurus-plugin-changelog@^3.0.0":
version "3.0.2"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-changelog/-/docusaurus-plugin-changelog-3.0.2.tgz#057490577b9d3c7a897e32e80c54a92e991be5b6"
integrity sha512-nlGed3F4eXvTwxsgNxa4S2E2MtBK4yWNCaCBDKFebTSpaBVIZKXA+ZPP1mqLTODW66TzYKfTATTeKqjwvdqb/A==
dependencies:
"@docusaurus/core" "3.5.2"
"@docusaurus/plugin-content-docs" "3.5.2"
"@docusaurus/utils-validation" "3.5.2"
fs-extra "^11.2.0"
"@nullbot/docusaurus-plugin-docsmenu@^3.0.2":
version "3.0.2"
resolved "https://registry.npmjs.org/@nullbot/docusaurus-plugin-docsmenu/-/docusaurus-plugin-docsmenu-3.0.2.tgz#598e85e992dba696e8914eb2c9e3db4afc228cd3"