У меня есть несколько пользовательских коллекций, которые отлично работают и сохраняются. Я добавил новый (customtags) и по какой-то причине, какую бы конфигурацию я ни попробовал, netlifycms не сохранит новые экземпляры. Хорошо, я могу редактировать уже созданные вручную, но новые не будут создаваться.
Папка customcollections / _customtags существует.
Если я вручную создаю файлы уценки, тогда netlify забирает их и я могу редактировать их, я также могу выбрать эти теги как отношения к пользовательской коллекции navtiles в соответствии с конфигурацией netlify.
У кого-нибудь есть идеи?
Конфигурация Netlify:
backend:
name: git-gateway
branch: master # Branch to update (optional; defaults to master)
# This line should *not* be indented
media_folder: "images/uploads" # Media files will be stored in the repo under images/uploads
collections:
- name: "posts"
label: "Posts"
folder: "customcollections/_posts"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "post"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Featured Image", name: "image", widget: "image"}
- {label: "Body", name: "body", widget: "markdown"}
# - {label: "Categories", name: "categories", widget: "list"}
- name: "navtiles"
label: "Navigation Tiles"
folder: "customcollections/_navtiles"
create: true
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "navtile"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Image", name: "image", widget: "image"}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Url", name: "url", widget: "string"}
- {label: "Tags", name: "tags", widget: "relation", collection: "customtags", displayFields: ["tag"], searchFields: ["tag"], valueField: "tag", multiple: true}
- name: "customtags"
label: "Tags"
folder: "customcollections/_customtags"
create: true
fields:
- {label: "tag", name: "tag", widget: "string"}
- name: "bannerslides"
label: "Banner Slides"
folder: "customcollections/_bannerslides"
create: true
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Image", name: "image", widget: "image"}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Url", name: "url", widget: "string"}
Существующий jekyllconfig
# Site settings
title: CSAcup
tagline: This is the tagline
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://dev.clearspringacupuncture.co.uk" # the base hostname & protocol for your site
# Plugins
plugins: ["jekyll-paginate"]
# Build settings
markdown: kramdown
sass:
sass_dir: assets/sass
# Pagination
paginate: 4
paginate_path: "/blog/page:num/"
collections_dir: customcollections
collections:
posts:
output: true
navtiles:
output: false
bannerslides:
output: false
posttiles:
output: false
features:
output: false
customtags:
output: false