fix baseUrl (#8347)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { MCPServer } from "../types/server";
|
||||
|
||||
const SERVERS_URL = "/goose/servers.json";
|
||||
const SERVERS_URL = "/servers.json";
|
||||
|
||||
export async function fetchMCPServers(): Promise<MCPServer[]> {
|
||||
try {
|
||||
@@ -19,14 +19,14 @@ export async function fetchMCPServers(): Promise<MCPServer[]> {
|
||||
export async function searchMCPServers(query: string): Promise<MCPServer[]> {
|
||||
const servers = await fetchMCPServers();
|
||||
const normalizedQuery = query.toLowerCase();
|
||||
|
||||
|
||||
return servers.filter((server) => {
|
||||
const normalizedName = server.name.toLowerCase();
|
||||
const normalizedDescription = server.description.toLowerCase();
|
||||
|
||||
|
||||
return (
|
||||
normalizedName.includes(normalizedQuery) ||
|
||||
normalizedDescription.includes(normalizedQuery)
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ async function fetchSkillsManifest(): Promise<Skill[]> {
|
||||
try {
|
||||
// In Docusaurus, baseUrl changes automatically for PR previews.
|
||||
// Example:
|
||||
// prod: /goose/
|
||||
// PR preview: /goose/pr-preview/pr-6752/
|
||||
// prod: /
|
||||
// PR preview: /pr-preview/pr-6752/
|
||||
const baseUrl = siteConfig.baseUrl.endsWith("/")
|
||||
? siteConfig.baseUrl
|
||||
: `${siteConfig.baseUrl}/`;
|
||||
|
||||
Reference in New Issue
Block a user