Hello,
I'm very new in Gatsbyjs and JAMstack websites in general. I added netlify CMS in my local project, I'm still learning it.
My problem is I can't see any post that I have made in the posts section in the control panel. and whenever I publish a new one it deosn't appear in my posts folder as well.
this is my post is saved in md format test.md:
title: test
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam arcu eros, congue in lorem et, blandit tempor sem. Cras vitae magna tristique, volutpat sem ac, dapibus risus. Praesent convallis eu mi quis congue. Nam finibus massa non turpis sollicitudin, a tempor nisl tincidunt. Vestibulum sed eleifend nibh. Nunc viverra feugiat justo, vel gravida ex vulputate in. Maecenas interdum suscipit enim vel pulvinar. Cras at aliquet felis, in sodales lectus. Quisque libero elit, mollis quis tristique a, faucibus vel orci. Praesent cursus, dolor eu dignissim sagittis, tortor felis ornare sapien, et tempus metus diam sit amet ligula. Vestibulum finibus dui vitae erat semper ultricies. In convallis et elit id mattis. Cras dictum diam nibh, at vulputate lectus elementum sed. Duis magna nisi, consequat vitae eros et, aliquam pulvinar est. Morbi iaculis id risus a hendrerit.
my posts are saved in src/pos folder
I'm developing this project in localhost and this is my config.yml file and its saved according to the root /static/admin/config.yml
backend:
name: test-repo
publish_mode: editorial_workflow
media_folder: "src/images/uploads" # Media files will be stored in the repo under images/uploads
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
collections:
- name: posts
label: Posts
folder: "src/pos"
create: true
fields:
- {name: title, label: Title}
- {name: body, label: Body, widget: markdown}
I can't see my posts in the control panel
here is a screenshot
https://gyazo.com/505ffef8355f3e6060b1651130070fee
I am experiencing the same issue, but only with parts of my website. I am using a collection of files to make every page of my website available for editing in the backend.
config.yml
- label: "Pages"
name: "pages"
create: false
files:
- label: "Profesores"
name: "profesores"
file: "profesores.md"
fields:
- { label: "T铆tulo de la p谩gina", name: "title", widget: "string" }
- { label: "Contenido", name: "body", widget: "markdown" }
- label: "Lista de profesores"
name: "teachers"
widget: "list"
fields:
- { label: "Nombre de profesor", name: "name", widget: "string" }
- { label: "Descripci贸n", name: "description", widget: "text" }
- { label: "Imagen", name: "image_path", widget: "image" }
profesores.md
title: Profesores
layout: profesores
teachers:
- name: Carlos Lague
image_path: /images/pages/profesores/carlos.jpg
description: El profesor con lo m谩s tiempo en la escuela y responsable para matem谩ticas y contabilidad.
- name: Ilonka Holt
image_path: /images/pages/profesores/elvis.jpg
description: Aprender ingl茅s es un aspecto importante para ser un profesional. Ilonka se ocupa de esa materia.
---
Tenemos especialistas de todo el pa铆s. Cada materia tiene su propio profesor que es responsable para clases, evaluaciones y el aprendizaje de todos sus estudiantes. Conozca a nuestros profesores aqu铆:
I have added other Markdown pages into the config.yml, and until now it worked fine. However, after adding the above configuration the backend for "Pages" is empty, it doesn't display any page.
I tried the following:
Any other file I add to the pages array causes the exact same behavior. If I add a file in _data or on the site's root, independent of it's content, name or structure, it causes the Pages collection to be empty in the backend.
GitHub Repository: https://github.com/andreasremdt/instituto-nacional
What can this be?
EDIT: Just created a new files collection with the name "test" and it works, although the content is exactly the same...
EDIT 2: After a bit of research it seems to be connected to the where the files are located. I created a subfolder (using Jekyll) and moved the profesores.md into it which caused the exact same problem. When the file is located in the project's root directory it works fine.
@andreasremdt I think your problem is different, can you please make a separate issue?
@Abdelrahman146 You still have the backend set to test-repo, which is just in-memory, it won't have any of your posts. The documentation about the different available backends is at https://www.netlifycms.org/docs/authentication-backends/.
I'm guessing you'll want to use GitHub.
@tech4him1 thank you so much :)
No problem! Feel free to reach out on our Gitter channel if you have more questions! https://gitter.im/netlify/NetlifyCMS
@Abdelrahman146 @tech4him1 I'm actually experiencing the exact same problem.
Has a proper fix been found?
Most helpful comment
@Abdelrahman146 You still have the backend set to
test-repo, which is just in-memory, it won't have any of your posts. The documentation about the different available backends is at https://www.netlifycms.org/docs/authentication-backends/.I'm guessing you'll want to use GitHub.