kentonv / ssjekyll

"Hacker-CMS" Sandstorm App mashing up Jekyll, Ace Editor, and jsTree
Other
67 stars 18 forks source link

"No such file or directory" due to missing front matter is confusing #5

Open tiagoefreitas opened 9 years ago

tiagoefreitas commented 9 years ago

See here: https://oasis.sandstorm.io/shared/Z6vDvTx3oYaBVrc1jmHH8PQr6dx4rcuIrrR-wljtEsC

Error: remote exception: remote exception: remote exception: remote exception: remote exception: open(name.cStr(), flags, mode): No such file or directory; name = /var/preview/index.html C++ location:(remote):?? type: failed

kentonv commented 9 years ago

Hi Tiago,

Hacker CMS uses Jekyll to generate HTML from Markdown. Jekyll only pays attention to files that contain something they call "front matter", which looks like, for example:

---
layout: page
title: My Site
---

Since your index.md didn't contain any front matter, no preview file was generated, hence the "no such file or directory" error. I added a front matter to your example and now it is working.

FWIW, I recognize that Hacker CMS has an embarrassingly bad UX, but we don't really have time to spend improving it right now. :/

tiagoefreitas commented 9 years ago

Thanks Kenton, should have read the docs...actually I just saw the front matter appears for new grains, I probably deleted it by accident.

ocdtrekkie commented 8 years ago

This just stumped me too when I was using it. I use a Hacker CMS grain to test Markdown for the docs. I just overwrote all with the markdown from the GitHub repo, and that didn't work well. ;)