Hello,
I am attempting to reorganize my posts to be in year/month/ folders instead of the single post folders. I am able to create the posts and see them on my site but I can no longer see them in the cms. Any ideas on what I can look at next?
Here is my config file.
collections:
- name: "news"
label: "News"
label_singular: "Article"
folder: "content/news"
create: true
slug: "{{year}}/{{month}}/{{slug}}"
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "news-post"}
Snapshot of my folder structure.
Snapshot of the cms page
I appreciate the info. I was able to get my posts back but now I have lost my images…
They are stored relatively like there supposed to according to the docs.
And my config file matches like it is supposed to.
collections:
- name: "news"
label: "News"
label_singular: "Article"
folder: "content/news"
create: true
slug: "{{slug}}"
path: "{{year}}/{{month}}/{{slug}}/post"
media_folder: ''
public_folder: ''
My global folders are correct as well.
media_folder: static/img
public_folder: /img
And the image file name shows in Graphql but when I list it there is nothing there
Am I missing something here?
erez
December 15, 2020, 11:24am
4
Hi @byebyers , where would you like to save your photos?
You can drop the collection level media folders, that is use:
collections:
- name: "news"
label: "News"
label_singular: "Article"
folder: "content/news"
create: true
slug: "{{slug}}"
path: "{{year}}/{{month}}/{{slug}}/post"
To keep the old behavior
Hey @erez ! Thanks for the tip but that did not work for me. I realize am turning this into 2 topics so I posted another question specific to my image issue.
Folder Collections Media and Public Folder not working as intended
As for my original issue, I do see my posts again in the CMS by adding path
to my config file.
collections:
- name: "news"
label: "News"
label_singular: "Article"
folder: "content/news"
create: true
slug: "{{slug}}"
path: "{{year}}/{{month}}/{{slug}}"