Issue with Astro and Sveltia CMS: Relation Fields Not Resolving Correctly for Multi-language Setup #302
Replies: 3 comments 1 reply
-
The But I think Sveltia CMS is not using the |
Beta Was this translation helpful? Give feedback.
-
I’ve fixed the Sveltia bug in v0.53.4, but I think you still need to fix some stuff on your site:
I’m not familiar with Astro, so unfortunately I cannot help the implementation details. |
Beta Was this translation helpful? Give feedback.
-
Hi @kyoshino, I’m still experiencing the same issue. I need the relation between collections to use a custom slug that includes the locale. For example, in this image, when I select a tag, category, or author, the editor saves the slug without the locale (en/{{slug}} or es/{{slug}}). Could you please advise on how to configure this correctly? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi @kyoshino,
I’m having an issue with Astro and Sveltia CMS. I’m migrating from the old Netlify CMS to Sveltia CMS because it offers improvements over DecapCMS for managing multi-language content.
The Problem:
My website is multilingual, and collections are correctly stored in language-specific folders (e.g.,
en
for English content andes
for Spanish content). However, when I try to relate collections in Sveltia CMS, it links them incorrectly.For example, the author relation is saved as
author: yuniel-acosta
, but Astro expects the relation to been/yuniel-acosta
for English content ores/yuniel-acosta
for Spanish content.What I Tried:
I attempted using value_field:
'{{locale}}/{{slug}}'
, but this results inauthor: /yuniel-acosta
instead of the expecteden/yuniel-acosta
ores/yuniel-acosta
.CMS Configuration (config.yml):
Astro Configuration (config.ts):
Example Branch
Any ideas on how to fix the relation field so that it correctly includes the locale (en/ or es/)? I appreciate any help!
Beta Was this translation helpful? Give feedback.
All reactions