Skip to content

Commit

Permalink
feat: Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed Aug 6, 2024
1 parent 089d923 commit 9e78213
Show file tree
Hide file tree
Showing 43 changed files with 1,402 additions and 1,637 deletions.
5 changes: 5 additions & 0 deletions apps/docs/.astro/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1722930418730
}
}
90 changes: 25 additions & 65 deletions apps/docs/.astro/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ declare module 'astro:content' {
}

declare module 'astro:content' {
export { z } from 'astro/zod';

type Flatten<T> = T extends { [K: string]: infer U } ? U : never;

export type CollectionKey = keyof AnyEntryMap;
Expand All @@ -29,52 +27,6 @@ declare module 'astro:content' {
export type ContentCollectionKey = keyof ContentEntryMap;
export type DataCollectionKey = keyof DataEntryMap;

// This needs to be in sync with ImageMetadata
export type ImageFunction = () => import('astro/zod').ZodObject<{
src: import('astro/zod').ZodString;
width: import('astro/zod').ZodNumber;
height: import('astro/zod').ZodNumber;
format: import('astro/zod').ZodUnion<
[
import('astro/zod').ZodLiteral<'png'>,
import('astro/zod').ZodLiteral<'jpg'>,
import('astro/zod').ZodLiteral<'jpeg'>,
import('astro/zod').ZodLiteral<'tiff'>,
import('astro/zod').ZodLiteral<'webp'>,
import('astro/zod').ZodLiteral<'gif'>,
import('astro/zod').ZodLiteral<'svg'>,
]
>;
}>;

type BaseSchemaWithoutEffects =
| import('astro/zod').AnyZodObject
| import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]>
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
| import('astro/zod').ZodIntersection<BaseSchemaWithoutEffects, BaseSchemaWithoutEffects>;

type BaseSchema =
| BaseSchemaWithoutEffects
| import('astro/zod').ZodEffects<BaseSchemaWithoutEffects>;

export type SchemaContext = { image: ImageFunction };

type DataCollectionConfig<S extends BaseSchema> = {
type: 'data';
schema?: S | ((context: SchemaContext) => S);
};

type ContentCollectionConfig<S extends BaseSchema> = {
type?: 'content';
schema?: S | ((context: SchemaContext) => S);
};

type CollectionConfig<S> = ContentCollectionConfig<S> | DataCollectionConfig<S>;

export function defineCollection<S extends BaseSchema>(
input: CollectionConfig<S>
): CollectionConfig<S>;

type AllValuesOf<T> = T extends any ? T[keyof T] : never;
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
ContentEntryMap[C]
Expand Down Expand Up @@ -164,11 +116,11 @@ declare module 'astro:content' {
? {
collection: C;
slug: ValidContentEntrySlug<C>;
}
}
: {
collection: C;
id: keyof DataEntryMap[C];
}
}
>;
// Allow generic `string` to avoid excessive type errors in the config
// if `dev` is not running to update as you edit.
Expand Down Expand Up @@ -293,14 +245,14 @@ declare module 'astro:content' {
"docs": {
"getting-started/concepts.mdx": {
id: "getting-started/concepts.mdx";
slug: "/getting-started/concepts";
slug: "getting-started/concepts";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"getting-started/introduction.mdx": {
id: "getting-started/introduction.mdx";
slug: "/getting-started/introduction";
slug: "getting-started/introduction";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
Expand Down Expand Up @@ -335,89 +287,97 @@ declare module 'astro:content' {
} & { render(): Render[".md"] };
"usage-guide/content-editor.md": {
id: "usage-guide/content-editor.md";
slug: "/usage-guide/content-editor";
slug: "usage-guide/content-editor";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".md"] };
"usage-guide/extensions/introduction.mdx": {
id: "usage-guide/extensions/introduction.mdx";
slug: "/usage-guide/extensions/introduction";
slug: "usage-guide/extensions/introduction";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"usage-guide/extensions/official-extensions/dev.mdx": {
id: "usage-guide/extensions/official-extensions/dev.mdx";
slug: "/usage-guide/extensions/official/dev";
slug: "usage-guide/extensions/official/dev";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"usage-guide/extensions/official-extensions/gpt.mdx": {
id: "usage-guide/extensions/official-extensions/gpt.mdx";
slug: "/usage-guide/extensions/official/gpt";
slug: "usage-guide/extensions/official/gpt";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"usage-guide/extensions/official-extensions/hashnode.mdx": {
id: "usage-guide/extensions/official-extensions/hashnode.mdx";
slug: "/usage-guide/extensions/official/hashnode";
slug: "usage-guide/extensions/official/hashnode";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"usage-guide/extensions/official-extensions/mdx.mdx": {
id: "usage-guide/extensions/official-extensions/mdx.mdx";
slug: "/usage-guide/extensions/official/mdx";
slug: "usage-guide/extensions/official/mdx";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"usage-guide/extensions/official-extensions/medium.mdx": {
id: "usage-guide/extensions/official-extensions/medium.mdx";
slug: "/usage-guide/extensions/official/medium";
slug: "usage-guide/extensions/official/medium";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"usage-guide/metadata.md": {
id: "usage-guide/metadata.md";
slug: "/usage-guide/metadata";
slug: "usage-guide/metadata";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".md"] };
"usage-guide/navigation/command-palette.md": {
id: "usage-guide/navigation/command-palette.md";
slug: "/usage-guide/navigation/command-palette";
slug: "usage-guide/navigation/command-palette";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".md"] };
"usage-guide/navigation/dashboard.md": {
id: "usage-guide/navigation/dashboard.md";
slug: "/usage-guide/navigation/dashboard";
slug: "usage-guide/navigation/dashboard";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".md"] };
"usage-guide/navigation/explorer.md": {
id: "usage-guide/navigation/explorer.md";
slug: "/usage-guide/navigation/explorer";
slug: "usage-guide/navigation/explorer";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".md"] };
"usage-guide/navigation/navigation.mdx": {
id: "usage-guide/navigation/navigation.mdx";
slug: "/usage-guide/navigation/introduction";
slug: "usage-guide/navigation/introduction";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
};
"recipes": Record<string, {
id: string;
slug: string;
body: string;
collection: "recipes";
data: InferEntrySchema<"recipes">;
render(): Render[".md"];
}>;

};

Expand All @@ -427,5 +387,5 @@ declare module 'astro:content' {

type AnyEntryMap = ContentEntryMap & DataEntryMap;

type ContentConfig = typeof import("../src/content/config");
export type ContentConfig = typeof import("../src/content/config.js");
}
51 changes: 0 additions & 51 deletions apps/docs/astro.config.mjs

This file was deleted.

Loading

0 comments on commit 9e78213

Please sign in to comment.