feat: enhance API and middleware functionality: add public API routes, implement program and course member checks, and improve rate limiting for invite acceptance. Update OpenAPI spec generation to focus on public API endpoints and add new middleware for automation key scopes. Include new documentation for lesson AI features and public API tests.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
|
||||
import { SquareArrowOutUpRight } from 'lucide-react';
|
||||
|
||||
export function baseOptions(): BaseLayoutProps {
|
||||
return {
|
||||
nav: {
|
||||
title: (
|
||||
<div className="flex items-center gap-2">
|
||||
<img src="/docs/logo-192.png" className="size-8" alt="ClassroomIO logo" />
|
||||
<span className="font-medium">ClassroomIO</span>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
links: [
|
||||
{
|
||||
text: (
|
||||
<div className="flex items-center gap-2">
|
||||
Contact <SquareArrowOutUpRight />
|
||||
</div>
|
||||
),
|
||||
url: 'https://twitter.com/classroomio',
|
||||
external: true
|
||||
},
|
||||
{
|
||||
text: (
|
||||
<div className="flex items-center gap-2">
|
||||
Demo <SquareArrowOutUpRight />
|
||||
</div>
|
||||
),
|
||||
url: 'https://dub.sh/ciodemo',
|
||||
external: true
|
||||
},
|
||||
{
|
||||
text: (
|
||||
<div className="flex items-center gap-2">
|
||||
Dashboard <SquareArrowOutUpRight />
|
||||
</div>
|
||||
),
|
||||
url: 'https://app.classroomio.com/',
|
||||
external: true
|
||||
},
|
||||
{
|
||||
type: 'icon',
|
||||
label: 'Discord',
|
||||
icon: (
|
||||
<img
|
||||
src="/docs/discord-blue.png"
|
||||
alt="discord icon"
|
||||
className="w-7 transition-all duration-500 hover:scale-90"
|
||||
/>
|
||||
),
|
||||
text: 'Discord',
|
||||
url: 'https://dub.sh/ciodiscord',
|
||||
external: true
|
||||
}
|
||||
],
|
||||
githubUrl: 'https://github.com/classroomio/classroomio'
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { loader, multiple } from 'fumadocs-core/source';
|
||||
import * as icons from 'lucide-static';
|
||||
import { docs } from 'fumadocs-mdx:collections/server';
|
||||
|
||||
export const source = loader({
|
||||
source: multiple({
|
||||
docs: docs.toFumadocsSource()
|
||||
}),
|
||||
baseUrl: '/',
|
||||
icon(icon) {
|
||||
if (!icon) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (icon in icons) {
|
||||
return icons[icon as keyof typeof icons];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export async function getDocsRouteData(slugs: string[]) {
|
||||
const page = source.getPage(slugs);
|
||||
if (!page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (page.data.type === 'docs') {
|
||||
return {
|
||||
tree: source.pageTree as object,
|
||||
slugs,
|
||||
pageType: 'docs' as const,
|
||||
path: page.path
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user