Support Forums

On update CMS is overwriting everything not just front matter

Last week I had everything working. The admin interface showed populated feilds for items that corresponded to my yml file. Now when I visit the adming CMS nothing is populated, despite the names in the front matter matching those in the config. And now when I go to just enter in new content it overwrites the entire “src/site/index.html”, not just the front matter.

I haven’t made any changes except paste a html file on the outermost parent folder. And upon discovering my issue, deleting it.

my config:

  - label: "Pages"
    name: "pages"
      - label: "Homepage"
        name: "homepage"
        file: "src/site/index.html"
          - {label: Layout, name: "layout", widget: "hidden", default: "layouts/base.html"}
          - {label: Title, name: page_title, widget: string}
          - label: "Featured Works"
            name: "featuredWorks"
            widget: "list"
            summary: '{{fields.title}}'
            label_singular: "Work"
              - {label: Image, name: image, widget: image}
              - {label: Title, name: title, widget: string,required: false}
              - {label: Description, name: description, widget: text,required: false}
          - label: "Services"
            name: "services"
            widget: "list"
            summary: '{{fields.title}}'
            label_singular: "service"
              - {label: Title, name: title, widget: string}
              - {label: Description, name: description, widget: text}

And a snippet of my front matter for “src/site/index.html”

layout: layouts/base.html
title: Home
page_title: Featured
  - image: /site/img/IMG_8729.jpeg
    title: Title 1
    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
      Pellentesque a sapien scelerisque, accumsan arcu eu, congue nisl. Duis
      iaculis sapien urna, sit amet ultricies tellus pulvinar sed. Mauris quis
      arcu est. Sed efficitur ipsum mi, id euismod velit pellentesque eu.
      Maecenas quis pulvinar ipsum.
  - title: "Service A"
    description: "lorem"

I have not fixed the issue, but I instead decided to store my collection in a file in my _data folder and call it from outside the page I was trying to use the front matter in.

Hi @nolestock, sorry for the very late reply and thank you for following up on your own thread!
While I’m not sure was the underlying issue and solution, the CMS does update the content of whatever is configured under file: <path>.