This is an automated email from the ASF dual-hosted git repository.

Yilialinn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new bdc5e741d8d fix(docs): verify APISIX-owned signals and Ingress release 
label (#2153)
bdc5e741d8d is described below

commit bdc5e741d8d223c2eaeccb7b3c258f30cc1e8c98
Author: Yilia Lin <[email protected]>
AuthorDate: Wed Nov 18 19:34:26 2026 +0800

    fix(docs): verify APISIX-owned signals and Ingress release label (#2153)
---
 next/scripts/check-documentation-ownership-signals.mjs | 14 ++++++++++++++
 next/src/lib/content.ts                                |  5 +++++
 next/tests/fixtures/documentation-search-signals.mjs   |  2 ++
 3 files changed, 21 insertions(+)

diff --git a/next/scripts/check-documentation-ownership-signals.mjs 
b/next/scripts/check-documentation-ownership-signals.mjs
index 94c9e8f3198..1f2d86b78e8 100644
--- a/next/scripts/check-documentation-ownership-signals.mjs
+++ b/next/scripts/check-documentation-ownership-signals.mjs
@@ -88,6 +88,20 @@ APISIX_OWNED_DOCS.forEach((urlPath) => {
   );
 });
 
+const docRefsPath = path.join(root, 'content/doc-refs.json');
+assert.ok(fs.existsSync(docRefsPath), 'Synced documentation refs should 
exist');
+const ingressRef = JSON.parse(fs.readFileSync(docRefsPath, 
'utf8'))['ingress-controller'];
+assert.match(ingressRef ?? '', /^v\d+\.\d+\.\d+$/, 'Ingress docs should use a 
release ref');
+for (const urlPath of [
+  '/docs/ingress-controller/overview/',
+  
'/docs/ingress-controller/reference/apisix-ingress-controller/api-reference/',
+]) {
+  assert.ok(
+    pageHtml(urlPath).includes(`<span>${ingressRef}</span>`),
+    `${urlPath} should display the synced ${ingressRef} release`,
+  );
+}
+
 console.log(
   `Validated ${api7OwnedDocs.length} API7-owned and 
${APISIX_OWNED_DOCS.length} APISIX-owned built documentation pages.`,
 );
diff --git a/next/src/lib/content.ts b/next/src/lib/content.ts
index b87dbe7fca4..a2adee32429 100644
--- a/next/src/lib/content.ts
+++ b/next/src/lib/content.ts
@@ -449,6 +449,11 @@ export function getSubprojectSidebar(project: string): 
SidebarNode[] {
 
 /** Version label a sub-project's docs were synced at, e.g. "0.5". */
 export function subprojectVersion(project: string): string | undefined {
+  // Ingress release branches are the source of truth; its config.json still
+  // reports 0.3.0 even when the synced docs come from v2.2.0.
+  const ingressRef = project === 'ingress-controller' ? docRefs[project] : 
undefined;
+  const ingressRelease = ingressRef?.match(/^v(\d+\.\d+\.\d+)$/);
+  if (ingressRelease) return ingressRelease[1];
   const cfg = Object.entries(sidebarConfigs).find(([p]) => 
p.includes(`docs-${project}-en/config.json`))?.[1];
   return (cfg?.default?.version ?? cfg?.version) as string | undefined;
 }
diff --git a/next/tests/fixtures/documentation-search-signals.mjs 
b/next/tests/fixtures/documentation-search-signals.mjs
index 2d8f60b535c..11d8e5acb85 100644
--- a/next/tests/fixtures/documentation-search-signals.mjs
+++ b/next/tests/fixtures/documentation-search-signals.mjs
@@ -49,6 +49,8 @@ export const API7_OWNED_DOC_SAMPLES = [
 
 export const APISIX_OWNED_DOCS = [
   '/docs/',
+  '/docs/apisix/dashboard/',
+  '/docs/apisix/deployment-modes/',
   '/docs/apisix/installation-guide/',
   '/docs/ingress-controller/overview/',
   '/docs/ingress-controller/concepts/gateway-api/',

Reply via email to