Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty or non-existent _posts folder results in "Unprocessable Entity" #78

Closed
dstaley opened this issue May 9, 2017 · 2 comments
Closed

Comments

@dstaley
Copy link

dstaley commented May 9, 2017

Steps to reproduce:

  1. mkdir no-posts-folder && cd no-posts-folder && reptar init
  2. rm -rf _posts
  3. reptar watch

Expected result:

Reptar renders _templates/index.html with an empty loop.

Actual result:

{
  "statusCode":422,
  "error":"Unprocessable Entity",
  "message":"Cannot read property 'assetProcessor' of undefined"
}
@hswolff
Copy link
Member

hswolff commented May 16, 2017

Oho! NIce find!

@hswolff
Copy link
Member

hswolff commented May 20, 2017

Fix I went with was to show a prettier error message. The default scaffold site has the index.html file derived from all the files on your page, without any files then that file doesn't exist. So to have an empty loop is actually a lot harder than it might appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants