docs(website): add provider pages and refresh docs
This commit is contained in:
@@ -31,15 +31,36 @@ function discoverDocsRoutes(): string[] {
|
||||
return [...routes].sort();
|
||||
}
|
||||
|
||||
function discoverAgentRoutes(): string[] {
|
||||
const routesDir = path.join(__dirname, "src/routes");
|
||||
const reserved = new Set([
|
||||
"__root",
|
||||
"agents",
|
||||
"blog",
|
||||
"changelog",
|
||||
"cloud",
|
||||
"docs",
|
||||
"download",
|
||||
"index",
|
||||
"privacy",
|
||||
]);
|
||||
return fs
|
||||
.readdirSync(routesDir, { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile() && entry.name.endsWith(".tsx"))
|
||||
.map((entry) => entry.name.replace(/\.tsx$/, ""))
|
||||
.filter((name) => !reserved.has(name))
|
||||
.sort()
|
||||
.map((slug) => `/${slug}`);
|
||||
}
|
||||
|
||||
const sitemapPages = [
|
||||
"/",
|
||||
"/agents",
|
||||
"/changelog",
|
||||
"/claude-code",
|
||||
"/cloud",
|
||||
"/codex",
|
||||
"/download",
|
||||
"/opencode",
|
||||
"/privacy",
|
||||
...discoverAgentRoutes(),
|
||||
...discoverDocsRoutes(),
|
||||
].map((routePath) => ({
|
||||
path: routePath,
|
||||
@@ -54,6 +75,9 @@ export default defineConfig((): UserConfig => {
|
||||
fs: {
|
||||
allow: [repoRoot],
|
||||
},
|
||||
watch: {
|
||||
ignored: ["**/.tanstack/**"],
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
cloudflare({ viteEnvironment: { name: "ssr" } }),
|
||||
|
||||
Reference in New Issue
Block a user