Netlify-cms: Files, manually added to collection folders, do not appear in the CMS

Created on 7 Jun 2018  路  2Comments  路  Source: netlify/netlify-cms

Some quick background. I'm migrating a wordpress blog with about 150 posts to Netlify CMS. I've started with the Gatsby starter project, and after converting my posts to Markdown, I dropped them in the "blog" folder for the blog collection. After deploying to Netlify, I see that Gatsby has built the static files correctly, but when I log into the CMS, none of my old posts appear under the blog collection. I'm completely new to Netlify CMS so I apologize if I'm missing something obvious. I really love the idea of this project and look forward to contributing further once I get my feet wet a little bit.

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
Markdown files manually added to my collection's folder and committed to Git, do not appear in the CMS.

- What is the expected behavior?
Properly formatted Markdown files added to collection folders should appear in the CMS.

- Please mention your versions where applicable.
Netlify CMS version: 1.7.0
Browser version: Chrome 66

- Please link or paste your config.yml below if applicable.

backend:
  name: git-gateway
  branch: master

media_folder: static/img
public_folder: /img
publish_mode: editorial_workflow

collections:
  - name: "blog"
    label: "Posts"
    folder: "src/pages/blog"
    create: true
    slug: "{{slug}}"
    fields:
      - {label: "Template Key", name: "templateKey", widget: "hidden", default: "blog-post"}
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Description", name: "description", widget: "text", "required": false}
      - {label: "Body", name: "body", widget: "markdown"}
      - {label: "Tags", name: "tags", widget: "list", "required": false}
      - {label: "Facebook Link Image", name: "fbLinkImg", widget: "image", "required": false}

  - name: "pages"
    label: "Pages"
    files:
      - file: "src/pages/about/index.md"
        label: "About"
        name: "about"
        fields:
          - {label: "Template Key", name: "templateKey", widget: "hidden", default: "about-page"}
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - file: "src/pages/products/index.md"
        label: "Products Page"
        name: "products"
        fields:
          - {label: "Template Key", name: "templateKey", widget: "hidden", default: "product-page"}
          - {label: Title, name: title, widget: string}
          - {label: Image, name: image, widget: image}
          - {label: Heading, name: heading, widget: string}
          - {label: Description, name: description, widget: string}
          - {label: Intro, name: intro, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Blurbs, name: blurbs, widget: list, fields: [{label: Image, name: image, widget: image}, {label: Text, name: text, widget: text}]}]}
          - {label: Main, name: main, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Image1, name: image1, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image2, name: image2, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image3, name: image3, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}]}
          - {label: Testimonials, name: testimonials, widget: list, fields: [{label: Quote, name: quote, widget: string}, {label: Author, name: author, widget: string}]}
          - {label: Full_image, name: full_image, widget: image}
          - {label: Pricing, name: pricing, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: string}, {label: Plans, name: plans, widget: list, fields: [{label: Plan, name: plan, widget: string}, {label: Price, name: price, widget: string}, {label: Description, name: description, widget: string}, {label: Items, name: items, widget: list}]}]}

Most helpful comment

As a follow up in case anyone comes here looking for answers. You can specify an extension in each collection. https://www.netlifycms.org/docs/configuration-options/#collections

All 2 comments

Ok, as often happens, I managed to fix my own problem. My conversion from Wordpress to markdown had given my files a .markdown extension, where the CMS was expecting .md. Just a simple oversight on my part. I'll close this issue for now.

As a follow up in case anyone comes here looking for answers. You can specify an extension in each collection. https://www.netlifycms.org/docs/configuration-options/#collections

Was this page helpful?
0 / 5 - 0 ratings