2022-12-22 10:18:44 +00:00
|
|
|
declare module 'astro:content' {
|
|
|
|
export { z } from 'astro/zod';
|
|
|
|
export type CollectionEntry<C extends keyof typeof entryMap> =
|
|
|
|
typeof entryMap[C][keyof typeof entryMap[C]] & Render;
|
|
|
|
|
|
|
|
type BaseCollectionConfig<S extends import('astro/zod').ZodRawShape> = {
|
|
|
|
schema?: S;
|
|
|
|
slug?: (entry: {
|
|
|
|
id: CollectionEntry<keyof typeof entryMap>['id'];
|
|
|
|
defaultSlug: string;
|
|
|
|
collection: string;
|
|
|
|
body: string;
|
|
|
|
data: import('astro/zod').infer<import('astro/zod').ZodObject<S>>;
|
|
|
|
}) => string | Promise<string>;
|
|
|
|
};
|
|
|
|
export function defineCollection<S extends import('astro/zod').ZodRawShape>(
|
|
|
|
input: BaseCollectionConfig<S>
|
|
|
|
): BaseCollectionConfig<S>;
|
|
|
|
|
|
|
|
export function getEntry<C extends keyof typeof entryMap, E extends keyof typeof entryMap[C]>(
|
|
|
|
collection: C,
|
|
|
|
entryKey: E
|
|
|
|
): Promise<typeof entryMap[C][E] & Render>;
|
|
|
|
export function getCollection<
|
|
|
|
C extends keyof typeof entryMap,
|
|
|
|
E extends keyof typeof entryMap[C]
|
|
|
|
>(
|
|
|
|
collection: C,
|
|
|
|
filter?: (data: typeof entryMap[C][E]) => boolean
|
|
|
|
): Promise<(typeof entryMap[C][E] & Render)[]>;
|
|
|
|
|
|
|
|
type InferEntrySchema<C extends keyof typeof entryMap> = import('astro/zod').infer<
|
|
|
|
import('astro/zod').ZodObject<Required<ContentConfig['collections'][C]>['schema']>
|
|
|
|
>;
|
|
|
|
|
|
|
|
type Render = {
|
|
|
|
render(): Promise<{
|
|
|
|
Content: import('astro').MarkdownInstance<{}>['Content'];
|
|
|
|
headings: import('astro').MarkdownHeading[];
|
|
|
|
injectedFrontmatter: Record<string, any>;
|
|
|
|
}>;
|
|
|
|
};
|
|
|
|
|
|
|
|
const entryMap: {
|
|
|
|
"articles": {
|
2022-12-28 09:36:15 +00:00
|
|
|
"en/2022.md": {
|
|
|
|
id: "en/2022.md",
|
|
|
|
slug: "en/2022",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"en/after-effects-expressions.mdx": {
|
|
|
|
id: "en/after-effects-expressions.mdx",
|
|
|
|
slug: "en/after-effects-expressions",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"en/faq.md": {
|
|
|
|
id: "en/faq.md",
|
|
|
|
slug: "en/faq",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"en/gratuiste.md": {
|
|
|
|
id: "en/gratuiste.md",
|
|
|
|
slug: "en/gratuiste",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"en/sci-hub-blocage.mdx": {
|
|
|
|
id: "en/sci-hub-blocage.mdx",
|
2022-12-22 10:18:44 +00:00
|
|
|
slug: "en/sci-hub-blocage",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
2022-12-26 22:15:27 +00:00
|
|
|
data: InferEntrySchema<"articles">
|
2022-12-22 10:18:44 +00:00
|
|
|
},
|
2022-12-28 09:36:15 +00:00
|
|
|
"en/the-day-I-jamd.mdx": {
|
|
|
|
id: "en/the-day-I-jamd.mdx",
|
|
|
|
slug: "en/the-day-I-jamd",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
2023-02-03 09:37:28 +00:00
|
|
|
"en/video-compression.mdx": {
|
|
|
|
id: "en/video-compression.mdx",
|
2022-12-28 09:36:15 +00:00
|
|
|
slug: "en/video-compression",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"fr/2022.md": {
|
|
|
|
id: "fr/2022.md",
|
|
|
|
slug: "fr/2022",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"fr/after-effects-expressions.md": {
|
|
|
|
id: "fr/after-effects-expressions.md",
|
|
|
|
slug: "fr/after-effects-expressions",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"fr/faq.md": {
|
|
|
|
id: "fr/faq.md",
|
|
|
|
slug: "fr/faq",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"fr/gratuiste.md": {
|
|
|
|
id: "fr/gratuiste.md",
|
|
|
|
slug: "fr/gratuiste",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"fr/sci-hub-blocage.mdx": {
|
|
|
|
id: "fr/sci-hub-blocage.mdx",
|
2022-12-22 10:18:44 +00:00
|
|
|
slug: "fr/sci-hub-blocage",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
2022-12-26 22:15:27 +00:00
|
|
|
data: InferEntrySchema<"articles">
|
2022-12-22 10:18:44 +00:00
|
|
|
},
|
2022-12-28 09:36:15 +00:00
|
|
|
"fr/the-day-I-jamd.mdx": {
|
|
|
|
id: "fr/the-day-I-jamd.mdx",
|
|
|
|
slug: "fr/the-day-I-jamd",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
"fr/video-compression.md": {
|
|
|
|
id: "fr/video-compression.md",
|
|
|
|
slug: "fr/video-compression",
|
|
|
|
body: string,
|
|
|
|
collection: "articles",
|
|
|
|
data: InferEntrySchema<"articles">
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"fragments": {
|
|
|
|
"en/acme-sh-tls-cert.md": {
|
|
|
|
id: "en/acme-sh-tls-cert.md",
|
|
|
|
slug: "en/acme-sh-tls-cert",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"en/array-vs-array.md": {
|
|
|
|
id: "en/array-vs-array.md",
|
|
|
|
slug: "en/array-vs-array",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"en/buttons.md": {
|
|
|
|
id: "en/buttons.md",
|
|
|
|
slug: "en/buttons",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
2023-02-03 09:37:28 +00:00
|
|
|
"en/image-full.mdx": {
|
|
|
|
id: "en/image-full.mdx",
|
2022-12-28 09:36:15 +00:00
|
|
|
slug: "en/image-full",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"en/nuxt-graphql-static.md": {
|
|
|
|
id: "en/nuxt-graphql-static.md",
|
|
|
|
slug: "en/nuxt-graphql-static",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"en/super-cookies.md": {
|
|
|
|
id: "en/super-cookies.md",
|
|
|
|
slug: "en/super-cookies",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"en/toulouse-fun.md": {
|
|
|
|
id: "en/toulouse-fun.md",
|
|
|
|
slug: "en/toulouse-fun",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"fr/acme-sh-tls-cert.md": {
|
|
|
|
id: "fr/acme-sh-tls-cert.md",
|
|
|
|
slug: "fr/acme-sh-tls-cert",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"fr/array-vs-array.md": {
|
|
|
|
id: "fr/array-vs-array.md",
|
|
|
|
slug: "fr/array-vs-array",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
2023-02-03 09:37:28 +00:00
|
|
|
"fr/buttons.mdx": {
|
|
|
|
id: "fr/buttons.mdx",
|
2022-12-28 09:36:15 +00:00
|
|
|
slug: "fr/buttons",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
2023-02-03 09:37:28 +00:00
|
|
|
"fr/image-full.mdx": {
|
|
|
|
id: "fr/image-full.mdx",
|
2022-12-28 09:36:15 +00:00
|
|
|
slug: "fr/image-full",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"fr/nuxt-graphql-static.md": {
|
|
|
|
id: "fr/nuxt-graphql-static.md",
|
|
|
|
slug: "fr/nuxt-graphql-static",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"fr/super-cookies.md": {
|
|
|
|
id: "fr/super-cookies.md",
|
|
|
|
slug: "fr/super-cookies",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
|
|
|
"fr/toulouse-fun.md": {
|
|
|
|
id: "fr/toulouse-fun.md",
|
|
|
|
slug: "fr/toulouse-fun",
|
|
|
|
body: string,
|
|
|
|
collection: "fragments",
|
|
|
|
data: InferEntrySchema<"fragments">
|
|
|
|
},
|
2022-12-22 10:18:44 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-12-26 22:15:27 +00:00
|
|
|
type ContentConfig = typeof import("./config");
|
2022-12-22 10:18:44 +00:00
|
|
|
}
|