Skip to content

Commit

Permalink
feat:API Provider调整顺序 (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinie13 authored Oct 23, 2024
1 parent 1101158 commit 3c28a21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/en/plugin/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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; // 默认不改变顺序
});
---

<BaseLayout title={t("plugin.title")} description={t("plugin.description")}>
Expand Down

0 comments on commit 3c28a21

Please sign in to comment.