NetlifyCMS - 未找到收集内容

时间:2017-04-27 10:59:09

标签: webpack gulp content-management-system netlify netlify-cms

我正在使用https://github.com/netlify-templates/kaldi-hugo-cms-template

我在config.yml创建了一个新集合(“pages”),而.md文件位于site / content。该网站的前端在localhost和Netlify上看起来很好。在localhost:3000 / admin也显示我的“页面”,我可以编辑它们,但是当我访问mysite.netlify.com/admin/#collections/pages时,我只看到“正在加载条目”。

这是我的收藏品

collections: # A list of collections the CMS should be able to edit
  - name: "pages"
    label: "Site pages"
    folder: "site/content"
    create: true #
    fields:
      - {label: Title, name: title, widget: string}
      - {label: Description, name: description, widget: string}
      - {label: Intro, name: intro, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: markdown}, {label: Subheading, name: subheading, widget: string}, {label: Primary call-to-action url, name: url, widget: string}, {label: Primary call to action, name: cta, widget: string}, {label: Secondary call-to-action url, name: url2, widget: string}, {label: Secondary call-to-action, name: cta2, widget: string}, {label: Blurbs, name: blurbs, widget: list, fields: [{label: Head, name: head, widget: string}, {label: Text, name: text, widget: markdown}]}]}
      - {label: Outro, name: outro, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Blurbs, name: blurbs, widget: list, fields: [{label: Image, name: image, widget: image}, {label: Text, name: text, widget: markdown}]}]}

1 个答案:

答案 0 :(得分:2)

尝试“mysite.netlify.com/admin/”(注意斜杠)。许多Hugo安装了Hugo输出admin.html和admin / index.html的经验,只有后者才有效。