diff --git a/src/components/Image.astro b/src/components/Image.astro
index 4582c7c..6d634fb 100644
--- a/src/components/Image.astro
+++ b/src/components/Image.astro
@@ -1,7 +1,7 @@
---
import type { ImageMetadata } from "astro";
import { Picture as AstroImage } from "astro:assets";
-import { inferRemoteSize, inferSize } from "astro/assets/utils";
+import { inferRemoteSize } from "astro/assets/utils";
import { getProcessedImage } from "@helpers/image";
interface Props {
src: ImageMetadata & { fsPath?: string; src?: string };
@@ -21,7 +21,7 @@ async function checkImage(
const src = typeof image === "string" ? image : image.src;
if (!src) return;
try {
- if (src.startsWith("/@fs") || src.startsWith("/_astro")) return {};
+ if (src.startsWith("/@fs") || src.startsWith("/_astro")) return image;
const res = await inferRemoteSize(src);
if (res.format) {
image.format = res.format;
diff --git a/src/pages/resources/resources.ts b/src/content/resources.ts
similarity index 100%
rename from src/pages/resources/resources.ts
rename to src/content/resources.ts
diff --git a/src/pages/resources/[resourceType]/[resourceName].astro b/src/pages/resources/[resourceType]/[resourceName].astro
index 2be48d8..e4fd782 100644
--- a/src/pages/resources/[resourceType]/[resourceName].astro
+++ b/src/pages/resources/[resourceType]/[resourceName].astro
@@ -3,7 +3,7 @@ import Layout from "@layouts/Layout.astro";
import { useTranslatedPath } from "@i18n/utils";
import ResourceDisplay from "@components/resources/Display.astro";
import * as memorium from "@helpers/memorium";
-import { resources as resourceTypes } from "../resources.ts";
+import { resources as resourceTypes } from "@content/resources.ts";
const { resourceType, resourceName } = Astro?.params;
diff --git a/src/pages/resources/[resourceType]/index.astro b/src/pages/resources/[resourceType]/index.astro
index 05d4ca6..db82eb0 100644
--- a/src/pages/resources/[resourceType]/index.astro
+++ b/src/pages/resources/[resourceType]/index.astro
@@ -2,7 +2,7 @@
import Layout from "@layouts/Layout.astro";
import HeroCard from "@components/HeroCard.astro";
import * as memorium from "@helpers/memorium";
-import { resources as resourceTypes } from "../resources.ts";
+import { resources as resourceTypes } from "@content/resources.ts";
import { useTranslations } from "@i18n/utils";
import ClientSearch from "@components/ClientSearch.svelte";
@@ -34,15 +34,19 @@ function isValidResource(res: any) {
return !!res?.content?._type;
}
-function buildSearchTerm(res:any){
- if(!res) return "";
- return Object.keys(res).map((key) => {
- if(key.startsWith("_")) return;
- const value = res[key];
- if(Array.isArray(value)) return value.join(" ");
- if(typeof value === "object") return buildSearchTerm(value);
- return value
- }).filter(s => !!s?.length).join(" ").toLowerCase();
+function buildSearchTerm(res: any) {
+ if (!res) return "";
+ return Object.keys(res)
+ .map((key) => {
+ if (key.startsWith("_")) return;
+ const value = res[key];
+ if (Array.isArray(value)) return value.join(" ");
+ if (typeof value === "object") return buildSearchTerm(value);
+ return value;
+ })
+ .filter((s) => !!s?.length)
+ .join(" ")
+ .toLowerCase();
}
---
@@ -52,7 +56,7 @@ function buildSearchTerm(res:any){