diff --git a/astro.config.mjs b/astro.config.mjs index 00af0ef..f34f6ae 100755 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -23,7 +23,9 @@ function parseFontString(fontStr) { } } - return { name, weights }; + // remove + from font name and add space + const cleanName = name.replace(/\+/g, " "); + return { name: cleanName, weights }; } // Build fonts configuration from theme.json diff --git a/package.json b/package.json index 200b2d4..4f47516 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "astroplate", - "version": "6.0.1", + "version": "6.0.2", "description": "Astro and Tailwindcss boilerplate", "author": "zeon.studio", "license": "MIT", @@ -24,7 +24,7 @@ "@astrojs/sitemap": "3.7.1", "@digi4care/astro-google-tagmanager": "^1.6.0", "@justinribeiro/lite-youtube": "^1.9.0", - "astro": "6.0.2", + "astro": "6.0.4", "astro-auto-import": "^0.5.1", "astro-swiper": "^2.2.1", "date-fns": "^4.1.0", @@ -39,13 +39,13 @@ "remark-collapse": "^0.1.2", "remark-toc": "^9.0.0", "sharp": "^0.34.5", - "vite": "^7.3.1" + "vite": "^8.0.0" }, "devDependencies": { "@tailwindcss/forms": "^0.5.11", "@tailwindcss/typography": "^0.5.19", "@tailwindcss/vite": "^4.2.1", - "@types/node": "25.4.0", + "@types/node": "25.5.0", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", "concurrently": "^9.2.1", @@ -56,6 +56,6 @@ "tailwind-bootstrap-grid": "^7.0.0", "tailwindcss": "^4.2.1", "typescript": "^5.9.3", - "wrangler": "^4.72.0" + "wrangler": "^4.73.0" } } diff --git a/readme.md b/readme.md index f60d1d6..a0bbeb0 100755 --- a/readme.md +++ b/readme.md @@ -12,8 +12,8 @@
-
-
+
+
@@ -70,7 +70,7 @@
### 📦 Dependencies
-- astro v6.0.2
+- astro v6.0.4
- node v22.12.0+ (see `.nvmrc`)
- yarn v1.22+
- tailwind v4+
diff --git a/src/layouts/components/ImageMod.astro b/src/layouts/components/ImageMod.astro
index 4087c38..a2d4ca9 100644
--- a/src/layouts/components/ImageMod.astro
+++ b/src/layouts/components/ImageMod.astro
@@ -11,12 +11,24 @@ interface Props {
loading?: "eager" | "lazy" | null | undefined;
decoding?: "async" | "auto" | "sync" | null | undefined;
format?: "auto" | "avif" | "jpeg" | "png" | "svg" | "webp";
+ fit?: "cover" | "contain" | "fill" | "none" | "scale-down";
class?: string;
style?: any;
}
// Destructuring Astro.props to get the component's props
-let { src, alt, width, height, loading, decoding, class: className, format, style } = Astro.props;
+let {
+ src,
+ alt,
+ width,
+ height,
+ loading,
+ decoding,
+ class: className,
+ format,
+ style,
+ fit,
+} = Astro.props;
src = `/public${src}`;
@@ -28,7 +40,9 @@ const isValidPath = images[src] ? true : false;
// Log a warning message in red if the image is not found
!isValidPath &&
- console.error(`\x1b[31mImage not found - ${src}.\x1b[0m Make sure the image is in the /public/images folder.`);
+ console.error(
+ `\x1b[31mImage not found - ${src}.\x1b[0m Make sure the image is in the /public/images folder.`,
+ );
---
{
@@ -39,6 +53,7 @@ const isValidPath = images[src] ? true : false;
width={width}
height={height}
loading={loading}
+ fit={fit ? fit : "contain"}
decoding={decoding}
class={className}
format={format}