如何在内容root文件夹中直接编辑Hugo内容文件

发布于 2025-01-25 22:44:34 字数 168 浏览 4 评论 0原文

我是Netlify和NetLifyCMS的新手。确实上传了一个运行良好的雨果网站。现在尝试实现CMS。这是一个非常简单的站点,只有几个 *.md内容文件直接位于 /内容文件夹的根部。我需要如何配置config.yml,以便我可以编辑它们?我确实找到了如何在 /内容或单个文件的子文件夹中编辑收集。

谢谢 此致

I am new to netlify and netlifyCMS. Did upload a Hugo site which is working well. Now trying to implement CMS. It is a very simple site with only a few *.md content files located directly in the root of the /content folder. How do I need to configure the config.yml so that I can edit them? I did only find how to edit collections in subfolders of /content or single files.

Thank you
Best regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你曾走过我的故事 2025-02-01 22:44:34

我想我确实找到了解决方案。确实将每个内容文件添加为一个文件。

collections: # A list of collections the CMS should be able to edit
  - label: "Inhalt"
    name: "inhalt"
    files: 
      - label: "Home"
        name: "home"
        file: "/content/home.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - label: "TCM"
        name: "tcm"
        file: "/content/tcm.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - label: "Psycho"
        name: "psycho"
        file: "/content/psycho.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}

I think I did find a solution. Did add every content-file as a single file.

collections: # A list of collections the CMS should be able to edit
  - label: "Inhalt"
    name: "inhalt"
    files: 
      - label: "Home"
        name: "home"
        file: "/content/home.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - label: "TCM"
        name: "tcm"
        file: "/content/tcm.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - label: "Psycho"
        name: "psycho"
        file: "/content/psycho.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文