ssjekyll icon indicating copy to clipboard operation
ssjekyll copied to clipboard

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

Open tiagoefreitas opened this issue 10 years ago • 3 comments

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

tiagoefreitas avatar Aug 10 '15 17:08 tiagoefreitas

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. :/

kentonv avatar Aug 11 '15 18:08 kentonv

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

tiagoefreitas avatar Aug 11 '15 18:08 tiagoefreitas

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. ;)

ocdtrekkie avatar Sep 29 '15 15:09 ocdtrekkie