【发布时间】:2019-11-02 15:40:39
【问题描述】:
我按照 Gatsby 网站上的教程进行操作。我正在运行“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
我应该如何格式化我的网址?我试过了: https://admiring-bose-8807f8.netlify.com/blog/first-blog/Title
不开心?
任何想法
【问题讨论】:
标签: gatsby netlify-cms