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
727 stars 33 forks source link

local development not working after recent update #128

Closed sardarms closed 3 months ago

sardarms commented 3 months ago

I was using the cms without any problem for a while now. But after the recent updates, it seems like, it is not working anymore. I am getting the below message:

image

I am using Hugo. My Config:


media_folder: static/files
public_folder: /files

collections:

name: 'post'
label: 'Posts'
folder: 'content/post'
create: true
slug: '{{fields.slug}}'
editor:
preview: true
fields:
{ label: 'Title', name: 'title', widget: 'string' }
{ label: 'Slug', name: 'slug', widget: 'string' }
{ label: 'Publish Date', name: 'date', widget: 'datetime', required: false }
{ label: "Weight", name: "weight", widget: "number", required: false }
{ label: "Featured image", name: "feature_image", widget: "image", required: false }
{ label: "Description for SEO", name: "description", widget: "string", required: false }
{ label: "Categories", name: "categories", widget: "list", required: false, field: { name: text, label: Text, widget: string } }
{ label: "Author", name: "author", widget: "string", required: false }
{ label: "Body", name: "body", widget: "markdown" }

When I try to use http://localhost:1313/admin/ and show the local root folder, it shows the error. However, one of my colleagues who also use the CMS with hugo, has no issue at all. If there is a bug, I do not think it is affecting everyone.

This may be related to this

Because789 commented 3 months ago

No issues here, still working like a charm after my faux pas 😄

kyoshino commented 3 months ago

After #124, I’ve added a simple check for a project/repository root directory. It just looks for the .git folder and shows an error message if not found. On Windows, you need to change an option to see the hidden folder in File Explorer.

Have you started a repository (using the git init command or a GUI like GitHub Desktop)? If not, please do so. 🙂

sardarms commented 3 months ago

I just added a .git folder and now its working!

For your info, I did not start the repo with git init. I just copy files and start using the CMS. Previously it just worked.

Thank you for your support 🙂

kyoshino commented 3 months ago

Got it!