Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:API Provider调整顺序 #336

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading