JSRocksHQ / harmonic

The next static site generator
http://harmonicjs.com/
MIT License
282 stars 26 forks source link

Access to next and previous post in metadata #175

Open viniciusdacal opened 8 years ago

viniciusdacal commented 8 years ago

@UltCombo @jaydson Would be nice if we could access some metadata about next and previous post from the current post. That would be usefull to make previous and next links, as we can see here http://www.viniciusdacal.com/pt/iniciante/2015/01/29/o-basico-do-basico-do-git-e-do-github.html What do yout think guys?

jaydson commented 8 years ago

Yep, that's sounds like a good idea. But, I don't know exactly where to put those informations. Perhaps we can focus on improve the issue #5 and have a full solution for pagination.

UltCombo commented 8 years ago

Exposing a next/prev link on the post template (and perhaps the page template now that we're merging their generation code) sounds good to me.

I'm just not sure how complex it would be to implement. Right now, we generate posts in parallel and sort their metadata after all posts are generated.

I believe this would require reading all posts' metadata, normalizing and sorting them before starting to render the templates.