Skip to content

Error loading the CMS configuration with Docusaurus #7680

@jerdog

Description

@jerdog

I have the index.html file in /static/admin:

<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Content Manager</title>
</head>
<body>
  <!-- Include the script that builds the page and powers Decap CMS -->
  <script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
</body>
</html>

and the config.yml file in /static/admin:

backend:
  name: github
  repo: my-repo
  branch: "dev"
publish_mode: editorial_workflow
media_folder: "static/img"
public_folder: "/img/"
collections:
  - name: docs
    label: "docs"
    folder: docs
    identifier_field: title
    extension: md
    widget: "list"
    create: true
    slug: "{{slug}}"
    sortable_fields: ["title"]
    fields:
      - { label: "Title", name: "title", widget: "string", required: true }
      - { label: "Sidebar Label", name: "sidebar_label", widget: "string", required: true }
      - { label: "Sidebar Position", name: "sidebar_position", widget: "number", required: true }
      - { label: "Author", name: "author", widget: "string", required: true }
      - { label: "Body", name: "body", widget: "markdown", required: true }

When I build the docusaurus site, and then load https://my-site/admin I get the following:

Error loading the CMS configuration
Config Errors:
YAMLSyntaxError: All collection items must start at the same column at line 1, column 1:

<!DOCTYPE html>
^^^^^^^^^^^^^^^…
Check your config.yml file.

Console:

decap-cms-app 3.9.0
decap-cms-core 3.9.0
decap-cms 3.9.0
config.js:353 Response for config.yml was not yaml. (Content-Type: text/html; charset=utf-8)
parse-cst.js:360  Uncaught (in promise) YAMLSyntaxError: All collection items must start at the same column at line 1, column 1:

<!DOCTYPE html>
^^^^^^^^^^^^^^^…

I'm at a loss....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions