Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read and edit my previously saved .md files #1260

Closed
ThiagoMiranda opened this issue Apr 13, 2018 · 6 comments
Closed

Read and edit my previously saved .md files #1260

ThiagoMiranda opened this issue Apr 13, 2018 · 6 comments

Comments

@ThiagoMiranda
Copy link

- Do you want to request a feature or report a bug?
Not getting my previously local collections on the /admin/ tab

- What is the current behavior?
I have a /admin/collections tab and when I click on a collection it shows an error "Sorry!
There's been an error - please report it!". I´m not seeing my current images too

- If the current behavior is a bug, please provide the steps to reproduce.

collections: 
  - name: home
    label: Página inicial
    folder: src/pages/banco
    create: true
    fields: 
      - { label: Section, name: section, widget: string }
      - { label: Title, name: title, widget: string }
      - { label: Date, name: date, widget: date }
      - { label: Path, name: path, widget: string }
      - { label: Template, name: template, widget: string }
      - { label: Body, name: body, widget: markdown }

  - name: product
    label: Produto
    files: 
      file: src/pages/produto/index.md
      create: true
      fields: 
        - { label: Section, name: section, widget: string }
        - { label: Title, name: title, widget: string }
        - { label: Date, name: date, widget: date }
        - { label: Path, name: path, widget: string }
        - { label: Template, name: template, widget: string }     
        - { label: Body, name: body, widget: markdown } 

Index.md on the Product page for example:

---
section: Loans
title: Loans Title
date: "2015-05-28T22:40:32.169Z"
path: "/produto"
template: "content"
---

## Title 1

- What is the expected behavior?
Read and edit my current saved .md files and see all my image files

- Please mention your CMS, node.js, and operating system version.
Using GatsbyJS + node v8.10 + Windows 10

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

backend:
  name: test-repo
  branch: netlify-cms

media_folder: src/images/

collections: 
  - name: home
    label: Página inicial
    folder: src/pages/banco
    create: true
    fields: 
      - { label: Section, name: section, widget: string }
      - { label: Title, name: title, widget: string }
      - { label: Date, name: date, widget: date }
      - { label: Path, name: path, widget: string }
      - { label: Template, name: template, widget: string }
      - { label: Body, name: body, widget: markdown }

  - name: product
    label: Produto
    files: 
      file: src/pages/produto/index.md
      create: true
      fields: 
        - { label: Section, name: section, widget: string }
        - { label: Title, name: title, widget: string }
        - { label: Date, name: date, widget: date }
        - { label: Path, name: path, widget: string }
        - { label: Template, name: template, widget: string }     
        - { label: Body, name: body, widget: markdown } 
@talves
Copy link
Collaborator

talves commented Apr 13, 2018

@ThiagoMiranda you will not be able to use the test-repo for the backend type. If this is a github repo use github or if you enabled identity within your site on Netlify you can use git-gateway

You can try to get some help in the community at https://gitter.im/netlify/NetlifyCMS

@tech4him1
Copy link
Contributor

tech4him1 commented Apr 13, 2018

File collections need to contain an array of files, see the example here: https://www.netlifycms.org/docs/collection-types/#file-collections
Corrected example:

  - name: product
    label: Produto
    files:
      - name: index
        label: Produto Index
        file: src/pages/produto/index.md
        ...

@ThiagoMiranda
Copy link
Author

@talves it´s a bitbucket repo. @tech4him1 Basically I was trying to read/edit my already saved .md files and create new ones. Is that possible?

@tech4him1
Copy link
Contributor

I think @talves answered your questions in Gitter, right? If you still need help, let's move the conversation there so that we can both help you easier.

@ThiagoMiranda
Copy link
Author

@tech4him1 sort off. He said that there's a little "complex" configuration that I could implement at least to read my local .md files and edit them but I'm not sure what. Can you provide me an example?

Thanks!

@tech4him1
Copy link
Contributor

@ThiagoMiranda He is the expert on the filesystem backend -- I'd ask him on Gitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants