Move to Astro

This commit is contained in:
2023-02-01 14:12:30 +00:00
commit bf36c8c9b3
463 changed files with 10340 additions and 0 deletions

204
.astro/types.d.ts vendored Normal file
View File

@@ -0,0 +1,204 @@
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 BaseSchemaWithoutEffects =
| import('astro/zod').AnyZodObject
| import('astro/zod').ZodUnion<import('astro/zod').AnyZodObject[]>
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
| import('astro/zod').ZodIntersection<
import('astro/zod').AnyZodObject,
import('astro/zod').AnyZodObject
>;
type BaseSchema =
| BaseSchemaWithoutEffects
| import('astro/zod').ZodEffects<BaseSchemaWithoutEffects>;
type BaseCollectionConfig<S extends BaseSchema> = {
schema?: S;
slug?: (entry: {
id: CollectionEntry<keyof typeof entryMap>['id'];
defaultSlug: string;
collection: string;
body: string;
data: import('astro/zod').infer<S>;
}) => string | Promise<string>;
};
export function defineCollection<S extends BaseSchema>(
input: BaseCollectionConfig<S>
): BaseCollectionConfig<S>;
type EntryMapKeys = keyof typeof entryMap;
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
type ValidEntrySlug<C extends EntryMapKeys> = AllValuesOf<(typeof entryMap)[C]>['slug'];
export function getEntryBySlug<
C extends keyof typeof entryMap,
E extends ValidEntrySlug<C> | (string & {})
>(
collection: C,
// Note that this has to accept a regular string too, for SSR
entrySlug: E
): E extends ValidEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getCollection<C extends keyof typeof entryMap, E extends CollectionEntry<C>>(
collection: C,
filter?: (entry: CollectionEntry<C>) => entry is E
): Promise<E[]>;
type InferEntrySchema<C extends keyof typeof entryMap> = import('astro/zod').infer<
Required<ContentConfig['collections'][C]>['schema']
>;
type Render = {
render(): Promise<{
Content: import('astro').MarkdownInstance<{}>['Content'];
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
}>;
};
const entryMap: {
"blog": {
"summer.mdx": {
id: "summer.mdx",
slug: "summer",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week1.mdx": {
id: "week1.mdx",
slug: "week1",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week2.mdx": {
id: "week2.mdx",
slug: "week2",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week3.mdx": {
id: "week3.mdx",
slug: "week3",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week4.mdx": {
id: "week4.mdx",
slug: "week4",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week5-6.mdx": {
id: "week5-6.mdx",
slug: "week5-6",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week7-8.mdx": {
id: "week7-8.mdx",
slug: "week7-8",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"week9-10.mdx": {
id: "week9-10.mdx",
slug: "week9-10",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"work1.mdx": {
id: "work1.mdx",
slug: "work1",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"work2.mdx": {
id: "work2.mdx",
slug: "work2",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"work3.mdx": {
id: "work3.mdx",
slug: "work3",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"work4.mdx": {
id: "work4.mdx",
slug: "work4",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"work5.mdx": {
id: "work5.mdx",
slug: "work5",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"work6.mdx": {
id: "work6.mdx",
slug: "work6",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"year2022-1.mdx": {
id: "year2022-1.mdx",
slug: "year2022-1",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"year2022-end.mdx": {
id: "year2022-end.mdx",
slug: "year2022-end",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"year2022-w1.mdx": {
id: "year2022-w1.mdx",
slug: "year2022-w1",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"year2022-w2.mdx": {
id: "year2022-w2.mdx",
slug: "year2022-w2",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
"year2022-w3.mdx": {
id: "year2022-w3.mdx",
slug: "year2022-w3",
body: string,
collection: "blog",
data: InferEntrySchema<"blog">
},
},
};
type ContentConfig = typeof import("../src/content/config");
}

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.jpg filter=lfs diff=lfs merge=lfs -text

20
.gitignore vendored Normal file
View File

@@ -0,0 +1,20 @@
# build output
dist/
.output/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

4
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}

11
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM node:18 as build
WORKDIR /app
COPY package.json package.json
COPY yarn.lock yarn.lock
COPY tsconfig.json tsconfig.json
RUN yarn install
COPY src ./src
COPY public ./public
COPY astro.config.mjs astro.config.mjs
RUN yarn build
FROM caddy:latest
COPY --from=build /app/dist /usr/share/caddy
EXPOSE 80

50
README.md Normal file
View File

@@ -0,0 +1,50 @@
# Welcome to [Astro](https://astro.build)
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/s/github/withastro/astro/tree/latest/examples/basics)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png)
## 🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
```
/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :--------------------- | :------------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |
| `npm run astro --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

12
astro.config.mjs Normal file
View File

@@ -0,0 +1,12 @@
import { defineConfig } from "astro/config";
// https://astro.build/config
import mdx from "@astrojs/mdx";
import serviceWorker from "astrojs-service-worker";
// https://astro.build/config
export default defineConfig({
site: "https://house-news.nozzy.online",
integrations: [mdx(), serviceWorker()],
});

22
package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "@example/basics",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^0.15.0",
"@astrojs/rss": "^2.1.0",
"astro": "^2.0.0",
"astrojs-service-worker": "^0.0.9"
},
"devDependencies": {
"sass": "^1.57.1"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

BIN
public/images/summer/bikeride.jpg LFS Normal file

Binary file not shown.

BIN
public/images/summer/camping.jpg LFS Normal file

Binary file not shown.

BIN
public/images/summer/car.jpg LFS Normal file

Binary file not shown.

BIN
public/images/summer/dyrham.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/images/summer/kayak.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

BIN
public/images/summer/outside.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 KiB

BIN
public/images/summer/shelf.jpg LFS Normal file

Binary file not shown.

BIN
public/images/summer/signpost.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

BIN
public/images/week1/5f.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week1/5r.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week1/cards.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week1/internet.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week1/lounge.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week1/rainbow.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week1/shelves.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/5f-coat-1.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/bedroom.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
public/images/week2/fishing.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/g&g-card.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/magnolia.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/office.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

BIN
public/images/week2/pew.mp4 Normal file

Binary file not shown.

BIN
public/images/week2/polyfilla.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/primer-0.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/primer-1.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/primer-2.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/images/week2/tip.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week2/topcoat-1.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

BIN
public/images/week2/yuk.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/images/week3/door1.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week3/door2.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week3/ethernet.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week3/movers1.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week3/movers2.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week3/movers3.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/images/week4/5f.jpg LFS Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 KiB

BIN
public/images/week4/bbq.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week4/cherry.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week4/elephant.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week4/kitchen.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week4/magnolia.jpg LFS Normal file

Binary file not shown.

BIN
public/images/week4/rose.jpg LFS Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More