korlibs / docs.korge.org

MIT License
1 stars 1 forks source link

Add prev/next buttons in articles #34

Open RezMike opened 4 years ago

RezMike commented 4 years ago

Add buttons pointing to previous and next articles in the current article (at the end and maybe at the beginning).

Something like that:

image

soywiz commented 4 years ago

I think it is not possible with Jekyll in a reasonable way

RezMike commented 3 years ago

@soywiz but maybe it can be done with Liquid? Like it's done with site's table of contents.

soywiz commented 3 years ago

Mmm maybe it is possible. It seems that there are previous and next properties in the post object. Check: https://talk.jekyllrb.com/t/previous-and-next-links-with-a-collections/3171

soywiz commented 3 years ago

If you investigated that already and you want to do that, please, go ahead

RezMike commented 3 years ago

@soywiz I just tried to implement it using toc.html as an example, but I failed. It turned out to be not as simple as I thought. In order to implement this feature, we need to sort all the pages (and their children) in the special order via liquid, but I don't know if it's possible (liquid may be not powerful enough for that).

soywiz commented 3 years ago

Uhm. That would require an extra effort assigning a numeric value to each page. Maybe not worth. Still let's keep this issue in the case we figure out a way at some point