0

I'm trying to use the Pelican Static Site Generator to create a static site which is not a blog.

Each markdown file inside the content/posts folder contains the following data.

---
name: Product Name here
price: Product Price goes here
image: Product Image goes here 
---

The description content in Markdown goes here

But when I preview the site, I'm getting this error message: Skipping filename.md: could not find information about 'title'. I get the same error message if I move all the markdown files into the content/pages folder.

I would like to display the product information (which is stored in markdown files as shown above) on the homepage (index.html)

How do I get the content inside the posts folder not to be treated as articles or in other words make the title & date metadata optional for articles?

Ishan
  • 3,931
  • 11
  • 37
  • 59
  • Is there any reason why you can't give your pages titles? Why not use the title to hold the product name? And if you don't want your pages to be dated articles, then they *need* to go in `content/pages`. – Waylan Oct 05 '16 at 17:07
  • You could use the title as the product name in this example, but lets assume it wasn't called title and also that for some other data it might not make sense to have a title field. – Ishan Oct 05 '16 at 21:23
  • So you want to use a tool for something other than its intended purpose and you're not willing to make some compromises. Then I'm afraid I can't help, except to suggest that you find a different tool. – Waylan Oct 07 '16 at 01:41

1 Answers1

1

Rename your name field to title:

---
title: Product Name here
price: Product Price goes here
image: Product Image goes here 
---

The description content in Markdown goes here

There is little semantic difference between the two, but Pelican needs the title feed to be there. Alternatively, just set it to a unused value:

---
title: none
name: Product Name here
price: Product Price goes here
image: Product Image goes here 
---

The description content in Markdown goes here
mfitzp
  • 15,275
  • 7
  • 50
  • 70