stack/docs/lib/source.ts
Madison 9e2cd4d50e
[Docs] - Full cleanup (#1105)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Removed Features**
  * Dashboard embed functionality has been removed from the platform.
  * Python template documentation and guides have been removed.

* **Documentation**
* Documentation structure has been significantly reorganized and
simplified.
  * Extensive template content and component guides have been removed.
* Apple OAuth integration guide updated with streamlined secret
generation flow.

* **Refactor**
  * Button component styling and variant system updated.
  * Routing configuration updated with simplified path handling.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-27 00:38:51 -06:00

41 lines
910 B
TypeScript

import { api, docs } from '@/.source';
import { loader } from 'fumadocs-core/source';
import { attachFile } from 'fumadocs-openapi/server';
import { icons } from 'lucide-react';
import { createElement } from 'react';
// Helper function to create icon resolver
function createIconResolver() {
return function icon(iconName?: string) {
if (!iconName) {
return;
}
if (iconName in icons) {
return createElement(icons[iconName as keyof typeof icons]);
}
return;
};
}
// Main docs source for /docs routes - includes all root sections
export const source = loader({
baseUrl: '/docs',
source: docs.toFumadocsSource(),
pageTree: {
attachFile,
},
icon: createIconResolver(),
});
// API source for /api routes
export const apiSource = loader({
baseUrl: '/api',
source: api.toFumadocsSource(),
pageTree: {
attachFile,
},
icon: createIconResolver(),
});