mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): add util reference pipeline (#537)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c11395ece1
commit
78112fbefd
@@ -1,7 +1,8 @@
|
||||
import { defineCollection, reference, z } from 'astro:content';
|
||||
import { file, glob } from 'astro/loaders';
|
||||
import { ComponentApiReferenceSchema } from './types/api-reference';
|
||||
import { ComponentReferenceSchema } from './types/component-reference';
|
||||
import { SUPPORTED_FRAMEWORKS } from './types/docs';
|
||||
import { UtilReferenceSchema } from './types/util-reference';
|
||||
import { defaultGitService } from './utils/gitService';
|
||||
import { globWithParser } from './utils/globWithParser';
|
||||
|
||||
@@ -107,12 +108,20 @@ const authors = defineCollection({
|
||||
}),
|
||||
});
|
||||
|
||||
const apiReference = defineCollection({
|
||||
const componentReference = defineCollection({
|
||||
loader: glob({
|
||||
pattern: '*.json',
|
||||
base: './src/content/generated-api-reference',
|
||||
base: './src/content/generated-component-reference',
|
||||
}),
|
||||
schema: ComponentApiReferenceSchema,
|
||||
schema: ComponentReferenceSchema,
|
||||
});
|
||||
|
||||
export const collections = { blog, docs, authors, apiReference };
|
||||
const utilReference = defineCollection({
|
||||
loader: glob({
|
||||
pattern: '*.json',
|
||||
base: './src/content/generated-util-reference',
|
||||
}),
|
||||
schema: UtilReferenceSchema,
|
||||
});
|
||||
|
||||
export const collections = { blog, docs, authors, componentReference, utilReference };
|
||||
|
||||
Reference in New Issue
Block a user