diff --git a/.editorconfig b/.editorconfig
index 3e71bac..ade3e38 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -5,5 +5,5 @@ end_of_line = lf
indent_style = space
indent_size = 4
-[*.nix]
+[{*.nix,*.yml}]
indent_size = 2
\ No newline at end of file
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 208b8e6..8efabcf 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -4,6 +4,7 @@ import typescriptEslint from "typescript-eslint";
export default [
{
ignores: [
+ "**/.astro",
"**/dist/*",
"**/result/*",
"**/node_modules/*"
@@ -13,9 +14,10 @@ export default [
...eslintPluginAstro.configs.recommended,
{
rules: {
- quotes: ["error", "double"],
- semi: ["error", "always"],
-
+ "quotes": ["error", "double"],
+ "semi": ["error", "always"],
+ "comma-dangle": ["error", "never"],
+
"@typescript-eslint/no-unused-vars": [
"error",
{
@@ -23,6 +25,6 @@ export default [
argsIgnorePattern: "^_"
}
]
- },
+ }
}
];
\ No newline at end of file
diff --git a/src/components/Badges.astro b/src/components/Badges.astro
index 98aa8d1..5a8a8f8 100644
--- a/src/components/Badges.astro
+++ b/src/components/Badges.astro
@@ -1,37 +1,25 @@
---
-import { Image } from "astro:assets";
-import type { ImageMetadata } from "astro";
+import { getEntry } from "astro:content";
-const images = import.meta.glob<{ default: ImageMetadata }>("../assets/badges/*.*");
-
-interface Props {
- badges: {
- href?: string,
- title?: string,
- alt: string,
- imagePath: string
- }[]
-}
-
-const { badges } = Astro.props;
+const badges = await getEntry("badges", "badges");
---
- {badges.map((badge) => {
- // hopefully we can dedupe this sometime....
- const isTreatedAsPublic = images[badge.imagePath] === undefined;
+ {badges.data.map((badge) => {
const hasHref = badge.href !== undefined;
+ // ugh.
+ // i wish we could dedupe this, but im not sure how
return <>
{hasHref ?
- {isTreatedAsPublic
- ?
- :
+ {typeof badge.path !== "string"
+ ?
+ :
}
: <>
- {isTreatedAsPublic
- ?

- :
+ {typeof badge.path !== "string"
+ ?

+ :

}
>}
>;
diff --git a/src/components/Projects.astro b/src/components/Projects.astro
index 207c529..6b48518 100644
--- a/src/components/Projects.astro
+++ b/src/components/Projects.astro
@@ -1,21 +1,13 @@
---
-interface Props {
- projects: {
- name: string,
- description: string,
- date: Date,
- dateVisual?: string,
- links: string[]
- }[]
-}
+import { getEntry } from "astro:content";
-const { projects } = Astro.props;
+const projects = await getEntry("projects", "projects");
let lastYear = 0;
---
- {projects.sort((a, b) => b.date.getTime() - a.date.getTime()).map((project) => {
+ {projects.data.sort((a, b) => b.date.getTime() - a.date.getTime()).map((project) => {
const isNewYear = project.date.getFullYear() !== lastYear;
lastYear = project.date.getFullYear();
diff --git a/src/content/badges/badges.yml b/src/content/badges/badges.yml
new file mode 100644
index 0000000..4e50cfe
--- /dev/null
+++ b/src/content/badges/badges.yml
@@ -0,0 +1,62 @@
+- path: /88x31.gif
+ alt: CLI prompt displaying 'reidlab'
+ title: my button! feel free to use or hotlink
+ href: /
+- path: ./img/blinchik.gif
+ alt: blinchik
+ title: best site on the internet!
+ href: https://yugoslavia.best
+- path: ./img/poweredbybob.gif
+ alt: powered by bob
+- path: ./img/miku.gif
+ alt: this site is miku approved
+- path: ./img/paws.gif
+ alt: made with my own two paws
+- path: ./img/nixos.png
+ alt: powered by nixos
+ title: free me from this prison
+ href: https://nixos.org
+- path: ./img/notitg.png
+ alt: notitg
+ title: play notitg!
+ href: https://noti.tg
+- path: ./img/kriswheretfarewe.png
+ alt: kris where tf are we
+- path: ./img/showmeyourheart.gif
+ alt: final fantasy geometry dash
+ title: ▼▼ ▼▼ » ▲▲▲▲ ▲▲▲▲ ‹ ▼▼ ▼▼ › ▲▲▲ ▲▲▲
+ href: https://gdbrowser.com/76767195
+- path: ./img/acab.gif
+ alt: all cops are bastards
+- path: ./img/w3cbad.gif
+ alt: w3c approved bad html markup
+- path: ./img/internetarchive.gif
+ alt: internet archive
+ href: https://archive.org
+- path: ./img/animeisgay.gif
+ alt: anime is gay as hell but i approve
+- path: ./img/halflife.gif
+ alt: half life
+ title: gorgon freeman....
+- path: ./img/vscode.png
+ alt: made with with vscode
+ href: https://code.visualstudio.com/
+- path: ./img/oat100.gif
+ alt: i got 100% on.zone
+ href: https://oat.zone
+- path: ./img/oat.gif
+ alt: oat.zone
+ title: cool person!
+ href: https://oat.zone
+- path: ./img/tidalwave.gif
+ alt: tidal wave geometry dash
+ title: <<
>>>>>>WAVE>>>
+ href: https://gdbrowser.com/86407629
+- path: ./img/singasongaboutlife.gif
+ alt: sing a song about life
+ title: sing a song about life
+ href: https://vyletpony.com/music
+- path: ./img/slugcat.png
+ alt: slug cat
+ title: Slug ca
+ href: https://rainworldgame.com/
\ No newline at end of file
diff --git a/src/assets/badges/acab.gif b/src/content/badges/img/acab.gif
similarity index 100%
rename from src/assets/badges/acab.gif
rename to src/content/badges/img/acab.gif
diff --git a/src/assets/badges/animeisgay.gif b/src/content/badges/img/animeisgay.gif
similarity index 100%
rename from src/assets/badges/animeisgay.gif
rename to src/content/badges/img/animeisgay.gif
diff --git a/src/assets/badges/blinchik.gif b/src/content/badges/img/blinchik.gif
similarity index 100%
rename from src/assets/badges/blinchik.gif
rename to src/content/badges/img/blinchik.gif
diff --git a/src/assets/badges/halflife.gif b/src/content/badges/img/halflife.gif
similarity index 100%
rename from src/assets/badges/halflife.gif
rename to src/content/badges/img/halflife.gif
diff --git a/src/assets/badges/internetarchive.gif b/src/content/badges/img/internetarchive.gif
similarity index 100%
rename from src/assets/badges/internetarchive.gif
rename to src/content/badges/img/internetarchive.gif
diff --git a/src/assets/badges/kriswheretfarewe.png b/src/content/badges/img/kriswheretfarewe.png
similarity index 100%
rename from src/assets/badges/kriswheretfarewe.png
rename to src/content/badges/img/kriswheretfarewe.png
diff --git a/src/assets/badges/miku.gif b/src/content/badges/img/miku.gif
similarity index 100%
rename from src/assets/badges/miku.gif
rename to src/content/badges/img/miku.gif
diff --git a/src/assets/badges/nixos.png b/src/content/badges/img/nixos.png
similarity index 100%
rename from src/assets/badges/nixos.png
rename to src/content/badges/img/nixos.png
diff --git a/src/assets/badges/notitg.png b/src/content/badges/img/notitg.png
similarity index 100%
rename from src/assets/badges/notitg.png
rename to src/content/badges/img/notitg.png
diff --git a/src/assets/badges/oat.gif b/src/content/badges/img/oat.gif
similarity index 100%
rename from src/assets/badges/oat.gif
rename to src/content/badges/img/oat.gif
diff --git a/src/assets/badges/oat100.gif b/src/content/badges/img/oat100.gif
similarity index 100%
rename from src/assets/badges/oat100.gif
rename to src/content/badges/img/oat100.gif
diff --git a/src/assets/badges/paws.gif b/src/content/badges/img/paws.gif
similarity index 100%
rename from src/assets/badges/paws.gif
rename to src/content/badges/img/paws.gif
diff --git a/src/assets/badges/poweredbybob.gif b/src/content/badges/img/poweredbybob.gif
similarity index 100%
rename from src/assets/badges/poweredbybob.gif
rename to src/content/badges/img/poweredbybob.gif
diff --git a/src/assets/badges/showmeyourheart.gif b/src/content/badges/img/showmeyourheart.gif
similarity index 100%
rename from src/assets/badges/showmeyourheart.gif
rename to src/content/badges/img/showmeyourheart.gif
diff --git a/src/assets/badges/singasongaboutlife.gif b/src/content/badges/img/singasongaboutlife.gif
similarity index 100%
rename from src/assets/badges/singasongaboutlife.gif
rename to src/content/badges/img/singasongaboutlife.gif
diff --git a/src/assets/badges/slugcat.png b/src/content/badges/img/slugcat.png
similarity index 100%
rename from src/assets/badges/slugcat.png
rename to src/content/badges/img/slugcat.png
diff --git a/src/assets/badges/tidalwave.gif b/src/content/badges/img/tidalwave.gif
similarity index 100%
rename from src/assets/badges/tidalwave.gif
rename to src/content/badges/img/tidalwave.gif
diff --git a/src/assets/badges/vscode.png b/src/content/badges/img/vscode.png
similarity index 100%
rename from src/assets/badges/vscode.png
rename to src/content/badges/img/vscode.png
diff --git a/src/assets/badges/w3cbad.gif b/src/content/badges/img/w3cbad.gif
similarity index 100%
rename from src/assets/badges/w3cbad.gif
rename to src/content/badges/img/w3cbad.gif
diff --git a/src/content/config.ts b/src/content/config.ts
new file mode 100644
index 0000000..e03e758
--- /dev/null
+++ b/src/content/config.ts
@@ -0,0 +1,30 @@
+import { z, defineCollection } from "astro:content";
+
+// some of these schemas are a bit Weird but,
+// i find it easier to have it in one array instead of several files
+
+const projectsCollection = defineCollection({
+ type: "data",
+ schema: z.array(z.object({
+ name: z.string(),
+ description: z.string(),
+ date: z.date(),
+ dateVisual: z.string().optional(),
+ links: z.string().array()
+ }))
+});
+
+const badgesCollection = defineCollection({
+ type: "data",
+ schema: ({ image }) => z.array(z.object({
+ path: image().or(z.string()),
+ alt: z.string(),
+ href: z.string().optional(),
+ title: z.string().optional()
+ }))
+});
+
+export const collections = {
+ projects: projectsCollection,
+ badges: badgesCollection
+};
\ No newline at end of file
diff --git a/src/content/projects/projects.yml b/src/content/projects/projects.yml
new file mode 100644
index 0000000..d0dc8b9
--- /dev/null
+++ b/src/content/projects/projects.yml
@@ -0,0 +1,11 @@
+- name: "lastfmpris"
+ description: "a rust application to scrobble your currently playing song on last.fm with mpris"
+ date: 2024-08-22
+ links:
+ - "https://git.reidlab.pink/reidlab/lastfmpris"
+- name: reidlab.pink
+ description: this website!
+ date: 2024-07-04
+ links:
+ - https://reidlab.pink
+ - https://git.reidlab.pink/reidlab/website
\ No newline at end of file
diff --git a/src/env.d.ts b/src/env.d.ts
index 8c34fb4..91ade3c 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -1 +1,5 @@
+// this file is automatically generated. shut up eslint
+/* eslint-disable @typescript-eslint/triple-slash-reference */
+
+///
///
\ No newline at end of file
diff --git a/src/pages/projects.astro b/src/pages/projects.astro
index 23735d1..ae92612 100644
--- a/src/pages/projects.astro
+++ b/src/pages/projects.astro
@@ -2,7 +2,8 @@
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
-/* funny import/export conflict if we don't do this :( */
+// funny import/export conflict if we don't do this :(
+// unfortunate...
import ProjectsList from "../components/Projects.astro";
---
@@ -10,26 +11,6 @@ import ProjectsList from "../components/Projects.astro";
unfortunately, at the moment, i don't have too much interesting things for you to see. eventually when i get my shit together, you'll see more and more things appear on here
as always, my socials and contacts are on the left or top side of the screen for you to access if you wanna poke around in my git repositories
-
+
\ No newline at end of file