Skip to content

Commit 0de246a

Browse files
authored
Merge pull request #10 from acmatku/new-website-23
New website 23
2 parents a4db9a0 + 18b9cdb commit 0de246a

147 files changed

Lines changed: 23938 additions & 11740 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.astro/icon.d.ts

Lines changed: 4861 additions & 0 deletions
Large diffs are not rendered by default.

.astro/types.d.ts

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
declare module 'astro:content' {
2+
interface Render {
3+
'.mdx': Promise<{
4+
Content: import('astro').MarkdownInstance<{}>['Content'];
5+
headings: import('astro').MarkdownHeading[];
6+
remarkPluginFrontmatter: Record<string, any>;
7+
}>;
8+
}
9+
}
10+
11+
declare module 'astro:content' {
12+
interface Render {
13+
'.md': Promise<{
14+
Content: import('astro').MarkdownInstance<{}>['Content'];
15+
headings: import('astro').MarkdownHeading[];
16+
remarkPluginFrontmatter: Record<string, any>;
17+
}>;
18+
}
19+
}
20+
21+
declare module 'astro:content' {
22+
export { z } from 'astro/zod';
23+
24+
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
25+
26+
export type CollectionKey = keyof AnyEntryMap;
27+
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
28+
29+
export type ContentCollectionKey = keyof ContentEntryMap;
30+
export type DataCollectionKey = keyof DataEntryMap;
31+
32+
// This needs to be in sync with ImageMetadata
33+
export type ImageFunction = () => import('astro/zod').ZodObject<{
34+
src: import('astro/zod').ZodString;
35+
width: import('astro/zod').ZodNumber;
36+
height: import('astro/zod').ZodNumber;
37+
format: import('astro/zod').ZodUnion<
38+
[
39+
import('astro/zod').ZodLiteral<'png'>,
40+
import('astro/zod').ZodLiteral<'jpg'>,
41+
import('astro/zod').ZodLiteral<'jpeg'>,
42+
import('astro/zod').ZodLiteral<'tiff'>,
43+
import('astro/zod').ZodLiteral<'webp'>,
44+
import('astro/zod').ZodLiteral<'gif'>,
45+
import('astro/zod').ZodLiteral<'svg'>,
46+
import('astro/zod').ZodLiteral<'avif'>,
47+
]
48+
>;
49+
}>;
50+
51+
type BaseSchemaWithoutEffects =
52+
| import('astro/zod').AnyZodObject
53+
| import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]>
54+
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
55+
| import('astro/zod').ZodIntersection<BaseSchemaWithoutEffects, BaseSchemaWithoutEffects>;
56+
57+
type BaseSchema =
58+
| BaseSchemaWithoutEffects
59+
| import('astro/zod').ZodEffects<BaseSchemaWithoutEffects>;
60+
61+
export type SchemaContext = { image: ImageFunction };
62+
63+
type DataCollectionConfig<S extends BaseSchema> = {
64+
type: 'data';
65+
schema?: S | ((context: SchemaContext) => S);
66+
};
67+
68+
type ContentCollectionConfig<S extends BaseSchema> = {
69+
type?: 'content';
70+
schema?: S | ((context: SchemaContext) => S);
71+
};
72+
73+
type CollectionConfig<S> = ContentCollectionConfig<S> | DataCollectionConfig<S>;
74+
75+
export function defineCollection<S extends BaseSchema>(
76+
input: CollectionConfig<S>
77+
): CollectionConfig<S>;
78+
79+
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
80+
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
81+
ContentEntryMap[C]
82+
>['slug'];
83+
84+
export function getEntryBySlug<
85+
C extends keyof ContentEntryMap,
86+
E extends ValidContentEntrySlug<C> | (string & {}),
87+
>(
88+
collection: C,
89+
// Note that this has to accept a regular string too, for SSR
90+
entrySlug: E
91+
): E extends ValidContentEntrySlug<C>
92+
? Promise<CollectionEntry<C>>
93+
: Promise<CollectionEntry<C> | undefined>;
94+
95+
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
96+
collection: C,
97+
entryId: E
98+
): Promise<CollectionEntry<C>>;
99+
100+
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
101+
collection: C,
102+
filter?: (entry: CollectionEntry<C>) => entry is E
103+
): Promise<E[]>;
104+
export function getCollection<C extends keyof AnyEntryMap>(
105+
collection: C,
106+
filter?: (entry: CollectionEntry<C>) => unknown
107+
): Promise<CollectionEntry<C>[]>;
108+
109+
export function getEntry<
110+
C extends keyof ContentEntryMap,
111+
E extends ValidContentEntrySlug<C> | (string & {}),
112+
>(entry: {
113+
collection: C;
114+
slug: E;
115+
}): E extends ValidContentEntrySlug<C>
116+
? Promise<CollectionEntry<C>>
117+
: Promise<CollectionEntry<C> | undefined>;
118+
export function getEntry<
119+
C extends keyof DataEntryMap,
120+
E extends keyof DataEntryMap[C] | (string & {}),
121+
>(entry: {
122+
collection: C;
123+
id: E;
124+
}): E extends keyof DataEntryMap[C]
125+
? Promise<DataEntryMap[C][E]>
126+
: Promise<CollectionEntry<C> | undefined>;
127+
export function getEntry<
128+
C extends keyof ContentEntryMap,
129+
E extends ValidContentEntrySlug<C> | (string & {}),
130+
>(
131+
collection: C,
132+
slug: E
133+
): E extends ValidContentEntrySlug<C>
134+
? Promise<CollectionEntry<C>>
135+
: Promise<CollectionEntry<C> | undefined>;
136+
export function getEntry<
137+
C extends keyof DataEntryMap,
138+
E extends keyof DataEntryMap[C] | (string & {}),
139+
>(
140+
collection: C,
141+
id: E
142+
): E extends keyof DataEntryMap[C]
143+
? Promise<DataEntryMap[C][E]>
144+
: Promise<CollectionEntry<C> | undefined>;
145+
146+
/** Resolve an array of entry references from the same collection */
147+
export function getEntries<C extends keyof ContentEntryMap>(
148+
entries: {
149+
collection: C;
150+
slug: ValidContentEntrySlug<C>;
151+
}[]
152+
): Promise<CollectionEntry<C>[]>;
153+
export function getEntries<C extends keyof DataEntryMap>(
154+
entries: {
155+
collection: C;
156+
id: keyof DataEntryMap[C];
157+
}[]
158+
): Promise<CollectionEntry<C>[]>;
159+
160+
export function reference<C extends keyof AnyEntryMap>(
161+
collection: C
162+
): import('astro/zod').ZodEffects<
163+
import('astro/zod').ZodString,
164+
C extends keyof ContentEntryMap
165+
? {
166+
collection: C;
167+
slug: ValidContentEntrySlug<C>;
168+
}
169+
: {
170+
collection: C;
171+
id: keyof DataEntryMap[C];
172+
}
173+
>;
174+
// Allow generic `string` to avoid excessive type errors in the config
175+
// if `dev` is not running to update as you edit.
176+
// Invalid collection names will be caught at build time.
177+
export function reference<C extends string>(
178+
collection: C
179+
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
180+
181+
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
182+
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
183+
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
184+
>;
185+
186+
type ContentEntryMap = {
187+
"post": {
188+
"astrowind-template-in-depth.mdx": {
189+
id: "astrowind-template-in-depth.mdx";
190+
slug: "astrowind-template-in-depth";
191+
body: string;
192+
collection: "post";
193+
data: InferEntrySchema<"post">
194+
} & { render(): Render[".mdx"] };
195+
"get-started-website-with-astro-tailwind-css.md": {
196+
id: "get-started-website-with-astro-tailwind-css.md";
197+
slug: "get-started-website-with-astro-tailwind-css";
198+
body: string;
199+
collection: "post";
200+
data: InferEntrySchema<"post">
201+
} & { render(): Render[".md"] };
202+
"how-to-customize-astrowind-to-your-brand.md": {
203+
id: "how-to-customize-astrowind-to-your-brand.md";
204+
slug: "how-to-customize-astrowind-to-your-brand";
205+
body: string;
206+
collection: "post";
207+
data: InferEntrySchema<"post">
208+
} & { render(): Render[".md"] };
209+
"landing.md": {
210+
id: "landing.md";
211+
slug: "landing";
212+
body: string;
213+
collection: "post";
214+
data: InferEntrySchema<"post">
215+
} & { render(): Render[".md"] };
216+
"markdown-elements-demo-post.mdx": {
217+
id: "markdown-elements-demo-post.mdx";
218+
slug: "markdown-elements-demo-post";
219+
body: string;
220+
collection: "post";
221+
data: InferEntrySchema<"post">
222+
} & { render(): Render[".mdx"] };
223+
"useful-resources-to-create-websites.md": {
224+
id: "useful-resources-to-create-websites.md";
225+
slug: "useful-resources-to-create-websites";
226+
body: string;
227+
collection: "post";
228+
data: InferEntrySchema<"post">
229+
} & { render(): Render[".md"] };
230+
};
231+
232+
};
233+
234+
type DataEntryMap = {
235+
236+
};
237+
238+
type AnyEntryMap = ContentEntryMap & DataEntryMap;
239+
240+
type ContentConfig = typeof import("../src/content/config");
241+
}

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [new-website-23]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v2
25+
# with:
26+
# path: . # The root location of your Astro project inside the repository. (optional)
27+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
28+
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
29+
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<<<<<<< Updated upstream
2-
3-
=======
4-
>>>>>>> Stashed changes
5-
assets/.DS_Store
1+
node_modules
2+
package-lock.json
3+
package-lock.json

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 onWidget
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)