From 094f890504553fc85754523bca86d560aeee779a Mon Sep 17 00:00:00 2001 From: Simon Vrachliotis Date: Tue, 5 Sep 2023 17:15:36 +1000 Subject: [PATCH] correct image path settings for astro assets support --- templates/astro/keystatic.config.ts | 5 ++++- templates/astro/src/styles.css | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/astro/keystatic.config.ts b/templates/astro/keystatic.config.ts index c8991d16b..f0f5e1b5e 100644 --- a/templates/astro/keystatic.config.ts +++ b/templates/astro/keystatic.config.ts @@ -17,7 +17,10 @@ export default config({ formatting: true, dividers: true, links: true, - images: true, + images: { + directory: 'src/assets/images/posts', + publicPath: '../../assets/images/posts/', + }, }), }, }), diff --git a/templates/astro/src/styles.css b/templates/astro/src/styles.css index 0da67e5a2..ebeb56b6d 100644 --- a/templates/astro/src/styles.css +++ b/templates/astro/src/styles.css @@ -22,3 +22,8 @@ ol { margin-bottom: 1rem; color: #1d1d1d; } + +img { + height: auto; + max-width: 100%; +}