dengliming opened a new issue, #1133:
URL: https://github.com/apache/shenyu-website/issues/1133
## Problem
The site currently builds **two different doc sets that are both labelled
`2.7.1`**:
- `docusaurus.config.js` sets `lastVersion: "current"` with `label: "2.7.1"`
→ served at `/docs/`.
- `versions.json` also contains `"2.7.1"` → `versioned_docs/version-2.7.1`
is served at `/docs/2.7.1/`, also labelled `2.7.1`.
The snapshot in `versioned_docs/version-2.7.1` was taken in #1126 *before*
the follow-up fixes to `docs/` (#1123, #1128, #1129 …), so it is stale: `diff
-rq docs versioned_docs/version-2.7.1` reports **64 differing files** (e.g. the
snapshot still links to `tree/master`, says "JDK 1.8+", and keeps the
misspelled `user-guide/admin-usage/namepsace.md`).
## Visible effects
1. `/docs/2.7.1/...` shows the banner *"This is documentation for Apache
ShenYu 2.7.1, which is no longer actively maintained… see the latest version
(2.7.1)"*.
2. `/versions` lists 2.7.1 twice: once under "Current version (Stable)" and
again under "Past versions (Not maintained anymore)" (`src/pages/versions.tsx`).
3. zh labels are swapped:
`i18n/zh/docusaurus-plugin-content-docs/version-2.7.1.json` has `version.label
= "当前版本"` while `current.json` has `"2.7.1"`.
4. All broken links reported by `yarn build` are in the stale snapshot
(already fixed in `docs/`):
```
- /docs/2.7.1/plugin-center/ai/ai-proxy ->
../http-process/contextPath-plugin.md
- /docs/2.7.1/plugin-center/proxy/tcp-plugin ->
../discovery/discovery-mode.md
- /docs/2.7.1/user-guide/proxy/mcp-tool-proxy ->
../../quick-start/quick-start-McpServer
- /zh/docs/2.7.1/plugin-center/ai/ai-proxy ->
../../user-guide/admin-usage/selector-and-rule.md,
../http-process/contextPath-plugin.md
- /zh/docs/2.7.1/user-guide/proxy/mcp-tool-proxy ->
../property-config/register-center-access.md,
../property-config/use-data-sync.md
Broken anchors: /docs/2.7.1/developer/local-model (#PluginData,
#SelectorData, … 11 anchors, en + zh),
/zh/docs/2.7.1/deployment/deployment-cluster (#Etcd开始,
#Nacos开始, #Zookeeper开始)
```
## Suggested fix
Pick one:
- **Option A (standard Docusaurus flow):** delete
`versioned_docs/version-2.7.1`,
`versioned_sidebars/version-2.7.1-sidebars.json`,
`i18n/zh/docusaurus-plugin-content-docs/version-2.7.1{,.json}`, run `yarn
docusaurus docs:version 2.7.1` from the current docs, drop `lastVersion:
"current"`, and relabel `current` as `Next` with `banner: "unreleased"`. Fix
the zh label to `2.7.1`.
- **Option B:** remove `"2.7.1"` from `versions.json` and delete the
snapshot folders, keeping `current` labelled 2.7.1 (as it was before #1126).
Either way `src/pages/versions.tsx` should also skip a versioned entry whose
name equals the current release label, and `src/data/docsInfo.js` should stay
in sync.
Also consider changing `onBrokenLinks: "log"` to `"warn"`/`"throw"` so this
is caught in CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]