sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 343 forks source link

Layout missing on 2nd request #557

Closed tobinharris closed 5 years ago

tobinharris commented 8 years ago

For some reason our blog hosted on Heroku always displays the blog index page correctly first time, http://www.pocketworks.co.uk/blog/. On second load the layout is missing. We're on Harp 0.17.0. Structure looks like this:

public/
  _blog_layout.ejs
  blog/
     _data.json
     index.ejs
     ...

And the _data.json in the blog folder.

// _data
{
  { title: "Blog", layout: "../_blog_layout.ejs" }
}

I've tried lots of alternatives, such as losing the ./public folder, moving the _blog_layout.ejs etc. Nothing works. Any ideas?

Cheers folks!

Tobin

tobinharris commented 8 years ago

Update: I hacked the issue by removing the public/blog/_data.json and putting the contents of it in the root public/_data.json. This causes other issues so not ideal, still looking for an answer!