Skip to main content
Glama
next-sitemap.config.cjs1.24 kB
/** @type {import('next-sitemap').IConfig} */ const baseUrl = process.env.NODE_ENV === "development" || !process.env.NEXT_PUBLIC_SITE_URL ? new URL("http://localhost:3000") : new URL(`https://${process.env.NEXT_PUBLIC_SITE_URL}`); module.exports = { outDir: "out", siteUrl: baseUrl, generateRobotsTxt: true, transform: async (config, path) => { // custom function to ignore the path if (customIgnoreFunction(path)) { return null; } // Use default transformation for all other cases return { loc: path, // => this will be exported as http(s)://<config.siteUrl>/<path> changefreq: config.changefreq, priority: config.priority, lastmod: config.autoLastmod ? new Date().toISOString() : undefined, alternateRefs: config.alternateRefs ?? [], }; }, }; /** * Function to check if a path should be ignored * @param {string} path - The path to check * @returns {boolean} - True if the path should be ignored */ function customIgnoreFunction(path) { const pathsToIgnore = [ "/api/", "opengraph-image-", "blog-1", "docs-og", "blog-og", "blog-posts-og", "posts", ]; return pathsToIgnore.some((pattern) => path.includes(pattern)); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metacode0602/open-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server