Closed dsgibbons closed 1 year ago
Hey, thanks for checking out Sveltia CMS! My quick local test couldn’t reproduce the issue. Do you use the GitHub backend or the local repository? #35 may be related, but not sure. 🤔
I'm using the GitHub backend. I'm not sure if this is the same issue as #35. The gallery images show up fine in Decap CMS.
Hmm, I’m puzzled. What are your media_folder
and typical image paths?
Sveltia CMS only displays images stored under the global and collection-specific media_folder
s (field-specific folders are not supported yet, but it’s probably not the case here). For example, If media_folder
is static/uploads
, static/images/favicon.png
won’t show up in the gallery, which is intentional.
Ok I know the problem now.
In the markdown preamble, DecapCMS produces:
---
title: ...
date: ...
thumbnail: ...
galleryImages:
- /uploads/img1.jpg
- /uploads/img2.jpg
---
where SveltiaCMS produces:
---
title: ...
date: ...
thumbnail: ...
galleryImages:
- image: /uploads/img1.jpg
- image: /uploads/img2.jpg
---
I had previously created the markdown using DecapCMS, so the gallery images weren't viewable in Sveltia. I think I prefer the DecapCMS format - can Sveltia be changed to match?
Thanks for looking into this! So it’s a compatibility issue in Sveltia. I’ll fix it for sure.
The fix is in 🎉
First of all, thank you for making this. I much prefer using this to Decap CMS.
I have a gallery configured like so in
config.yml
:When I go to the UI, pre-existing images don't appear in the gallery, even though they are in the Markdown metadata under
galleryImages
. If I re-add the images via Svelta CMS, the images appear in the UI. However, the resulting Markdown is unchanged, and if I reload the post in the UI, the images disappear again.