Closed deployn closed 10 months ago
Assuming you’re using Folder Collections Media and Public Folder... When I see the Sveltia code, {{slug}}
seems already supported. I’ll figure out why it’s not working.
And okay, you use the i18n support. I actually saw you posted a comment on https://github.com/decaporg/decap-cms/issues/4781 and realized that Sveltia probably has the same issue here even though the codebase is totally different. I’m happy to fix it.
Thanks for the reply. I'll try again with the slug directory. If you say it's supported, I'm sure the problem is on my end.
Edit: You were right, something was wrong with my installation. I am now able to generate the desired structure. The only problem left is relative location of the asset folder (../../something/image.png
instead of image.png
)
The fix is live! https://github.com/sveltia/sveltia-cms/releases/tag/v0.8.5
Hello,
I'm currently seeking a way to configure individual media folders for each post. In Netlify CMS, you can achieve this by setting the
media_folder
andpublic_folder
paths dynamically based on the slug like so:However, this approach doesn't seem to work in Sveltia. When I try to set the path to /src/content/blog/{{slug}}, the directory is incorrectly created with the literal name "{{slug}}" rather than substituting the actual post slug.
Additionally, I need to maintain locale-specific directories within the blog folder, like this:
Is there currently a way to have a separate directory for each post's media while also keeping the locale directories intact? Any guidance or workaround would be greatly appreciated.