From 3c28a210d16092914a340affd52a60f0b9b77d70 Mon Sep 17 00:00:00 2001 From: Tinie13 <157440339+Tinie13@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:03:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:API=20Provider=E8=B0=83=E6=95=B4=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=20(#336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/en/plugin/index.astro | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/en/plugin/index.astro b/src/pages/en/plugin/index.astro index affc9fa031..2e68d83809 100644 --- a/src/pages/en/plugin/index.astro +++ b/src/pages/en/plugin/index.astro @@ -66,7 +66,13 @@ const dataSource = posts GithubHigressUrl: item.data.githubHigressUrl || `https://github.com/alibaba/higress/tree/main/plugins/wasm-go/extensions/${item.slug.split('/').pop()}`, }; }) - .filter((item) => item.Functionality); + .filter((item) => item.Functionality) + .sort((a, b) => { + // 将“大模型API供应”(key: ai,childKey: api-provider)放在最前面 + if (a.SecondaryTitle === "API Provider") return -1; + if (b.SecondaryTitle === "API Provider") return 1; + return 0; // 默认不改变顺序 + }); ---