将 netlify cms 添加到站点时,如何让 slug 出现在 graphql 中?我有一个博客文章集合,除了蛞蝓之外,一切都显示出来了:
backend:
name: git-gateway
branch: master # Branch to update (optional; defaults to master)
media_folder: static/images
public_folder: /images
collections:
- name: "blog"
label: "Blog"
folder: "content/blogPost"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields: # The fields for each document, usually in front matter
- { label: "Layout", name: "layout", widget: "hidden", default: "blog" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Body", name: "body", widget: "markdown" }