我按照盖茨比网站上的教程进行操作。我正在运行“hello world” https://admiring-bose-8807f8.netlify.com/站点。我创建了一个帖子,但坚持让它显示。我正在使用 gatsby-source-filesystem 插件。我的 gatsby-config.js 文件如下:
module.exports = {
/* Your site config here */
plugins: [
`gatsby-plugin-netlify-cms`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `blog`,
path: `${__dirname}/blog`
},
},
`gatsby-transformer-remark`,
]
}
我的 config.yml 是
backend:
name: github
repo: jamesgrubb/Gatsbycms
media_folder: static/assets
public_folder: assets
collections:
- name: blog
label: Blog
folder: blog
create: true
fields:
- { name: path, label: Path }
- { name: date, label: Date, widget: date }
- { name: title, label: Title }
- { name: body, label: Body, widget: markdown }
当我进入管理员并单击以创建新帖子时,我有以下文件
- 小路
- 日期
- 标题
- 身体
我输入了以下字符串:
- 路径:/first-blog/
- 日期:(预填)
- 标题:标题
- 身体:Lorem ipsum
我应该如何格式化我的 URL?我试过了: https ://admiring-bose-8807f8.netlify.com/blog/first-blog/Title
没有快乐?
有任何想法吗