sveltia / sveltia-cms

Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
962 stars 49 forks source link

Work with Local Repository, dev files in WSL2 #100

Closed Because789 closed 9 months ago

Because789 commented 9 months ago

Ok, I feel very, very stupid now, but after like 5h of trying I figured out my issue, so I'm gonna leave the solution here, if anyone else runs into the same thing.

The problem

I'm a hobbyist developer and I do my stuff in this environment:

I wanted to try the awesome Astro Starter template which uses Sveltia CMS. I cloned it to my dev folder on Ubuntu, set up a dev container and got it running on localhost:4321 in no time. When I went to localhost:4321/admin/index.html, I got the Work with Local Repository button as expected and described here, great!

But when I clicked on the button, unlike in the Windows Explorer:

ViewInExplorer

There was no Linux file system available:

ViewInFolderChooser

I figured, that was quite logical and it seemed to fit the note on WSL in the README.md.

The solution

Without getting in all the details on how I wasted my time the next hours (I even set up an Ubuntu bear metal server, where it worked beautifully), it turns out I'm just stupid and the WSL integration is just great and it works out of the box without changing anything, you just have to click the right dropdown:

DropdownOpen

After choosing Linux here, I was able to choose my astro-starter folder on the Ubuntu file system and I was able to edit files in Sveltia without issues. Hope that helps others to avoid headaches...

kyoshino commented 9 months ago

Thanks for your insights, @Because789! Since this is a bug not in Sveltia CMS but in Chrome, I’ll convert the issue to a discussion, and add a link to it from README.