1

I have configured CMS using js as follows

index.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="robots" content="noindex" />
    <title>Content Manager</title>

    <script>
      ...
      let CMS_CONFIG = {
        backend: {
          name: "github",
          repo: `${ACCOUNT_NAME}/${REPO_NAME}`,
          branch: "master",
        },
        media_folder: "experiment/images",
        collections: [....],
      };
    </script>
  </head>
  <body>
    <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
    <script>
      CMS.init({ config: CMS_CONFIG });
    </script>
  </body>
</html>

there is no config.yml in admin folder. this works absolutely fine ans CMS is functional, but console still shows error in loading config.yml

Uncaught (in promise) Error: Failed to load config.yml (404)

How do I prevent this error?

I tried adding empty config.yml, then it shows other errors in console.

0 Answers0