1

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

我在 config.yml 和 .md 文件位于站点/内容中创建了一个新集合(“页面”)。该站点的前端在 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}]}]}

4

1 回答 1

2

尝试“mysite.netlify.com/admin/”(注意尾部斜杠)。很多 Hugo 安装体验 Hugo 同时输出 admin.html 和 admin/index.html,只有后者可以工作。

于 2017-12-10T17:26:39.027 回答