mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
<!-- Make sure you've read the CONTRIBUTING.md guidelines: https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md --> ## Changes ### overview Page Redesign - Added centered hero section with Stack Auth logo and welcome message - Replaced verbose "Why Stack Auth" section with a clean Quick start guide for next.js - added Components section with compact card links. - Streamlined QuickLinks and Apps sections - Added lastModified frontmatter support ### Frontmatter schema extension - Extended frontmatter schema to support optional lastModified field - Enables pages to display when they were last updated ### Last Modified Display - Added subtle "Last Updated" text at the bottom of pages that have the lastModified frontmatter field ### Copy Button for Code Blocks - Added copy-to-clipboard button to all codeblocks - Button appears on hover, shows checkmark feedback when copied - Applies to all code blocks ### New Code Examples - Added setup/overview examples for the overview page quick start - install - npx command - use-auth - useUser example <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Code blocks gain a copy-to-clipboard button. * Docs pages now show "Last updated" timestamps when available. * **Documentation** * Overview page redesigned into a hero + quick-start, component showcase, and explore sections with clearer links. * Setup examples expanded to include an "install" quick-start and an authentication "use" example. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
52 lines
1.0 KiB
TypeScript
52 lines
1.0 KiB
TypeScript
import {
|
|
defineConfig,
|
|
defineDocs,
|
|
frontmatterSchema,
|
|
metaSchema,
|
|
} from 'fumadocs-mdx/config';
|
|
import { z } from 'zod';
|
|
|
|
// Extended frontmatter schema with lastModified
|
|
const extendedFrontmatterSchema = frontmatterSchema.extend({
|
|
lastModified: z.string().optional(),
|
|
});
|
|
|
|
// You can customise Zod schemas for frontmatter and `meta.json` here
|
|
// see https://fumadocs.vercel.app/docs/mdx/collections#define-docs
|
|
export const docs = defineDocs({
|
|
docs: {
|
|
schema: extendedFrontmatterSchema,
|
|
},
|
|
meta: {
|
|
schema: metaSchema,
|
|
},
|
|
});
|
|
|
|
// Separate collection for API content
|
|
export const api = defineDocs({
|
|
dir: './content/api',
|
|
docs: {
|
|
schema: extendedFrontmatterSchema,
|
|
},
|
|
meta: {
|
|
schema: metaSchema,
|
|
},
|
|
});
|
|
|
|
// Separate collection for Dashboard content
|
|
export const dashboard = defineDocs({
|
|
dir: './content/dashboard',
|
|
docs: {
|
|
schema: extendedFrontmatterSchema,
|
|
},
|
|
meta: {
|
|
schema: metaSchema,
|
|
},
|
|
});
|
|
|
|
export default defineConfig({
|
|
mdxOptions: {
|
|
// MDX options
|
|
},
|
|
});
|