0

Any ideas on how to make a deeper sub-folder structure for the Netlify CMS template that serves the content pages. Is it possible to be done with Netlify CMS config.yml template.

That's what I have currently:

/Content / Topic Folder / Topic section folder / Language files.md

Hugo Structure

Currently I have this

backend:
  name: git-gateway
  branch: master
media_folder: static/img
public_folder: /img
collections:
  - name: "about"
    label: "About"
    folder: "content/about"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:d
      - {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
      - {label: "Title", name: "title", widget: "string"}
      - {label: 'URL', name: 'URL', widget: 'string' }
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Featured Image", name: "thumbnail", widget: "image"}
      - {label: "Body", name: "body", widget: "markdown"}
idm
  • 189
  • 1
  • 11

1 Answers1

0

Found out it's as simple as adding a longer path and title such as Folder / Subfolder. Might seem obvious but if you are not experienced with Hugo and Netlify CMS like me, here is what did the trick in my case:

collections:
  - name: "about" # Used in routes, e.g., /admin/collections/blog
    label: "About / Forum" # Used in the UI
    folder: "content/about/forum" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
      - {label: "Title", name: "title", widget: "string"})```
idm
  • 189
  • 1
  • 11