[英]Using Pelican Static Site Generator for something other than a blog
我正在尝试使用Pelican静态站点生成器创建不是博客的静态站点。
content/posts
文件夹内的每个markdown文件都包含以下数据。
---
name: Product Name here
price: Product Price goes here
image: Product Image goes here
---
The description content in Markdown goes here
但是,当我预览站点时,收到以下错误消息: 跳过filename.md:找不到有关'title'的信息 。 如果将所有markdown文件移到content/pages
文件夹中,则会收到相同的错误消息。
我想在首页(index.html)上显示产品信息(如上所示存储在markdown文件中)
如何获得posts文件夹中的内容不被视为文章,或者换句话说,标题和日期元数据对于文章是可选的?
将您的name
字段重命名为title
:
---
title: Product Name here
price: Product Price goes here
image: Product Image goes here
---
The description content in Markdown goes here
两者之间在语义上没有什么区别,但Pelican需要title
供稿才能使用。 另外,只需将其设置为未使用的值即可:
---
title: none
name: Product Name here
price: Product Price goes here
image: Product Image goes here
---
The description content in Markdown goes here
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.