Pinjasaur / bic

Static blog generator, in bash
https://bic.sh/
10 stars 1 forks source link

Pagination #12

Open Pinjasaur opened 1 year ago

Pinjasaur commented 1 year ago

Related to #10.

Supporting pagination would be a nice feature.

Some thoughts:

Pinjasaur commented 1 year ago

Would need to consider how the templating would work too.

As inspiration, my blog looks like:

{{#pagination}}

<div style="text-align: center;">
  <small>
    {{#previous}}
    <a class="js-newer" href="/page/{{previous}}">&larr; Previous page</a>
    {{/previous}}
    {{#previous}}{{#next}}&nbsp;&bullet;&nbsp;{{/next}}{{/previous}}
    {{#next}}
    <a class="js-older" href="/page/{{next}}">Next page &rarr;</a>
    {{/next}}
  </small>
</div>

<hr>

<div style="text-align: center;">
  <small>Page {{current}} of {{total}}</small>
</div>

{{/pagination}}

https://github.com/Pinjasaur/blot-theme-jot/blob/fba89a39137a77b45b1c8b71e90672faa2ec003d/entries.html#L24-L44

Pinjasaur commented 1 year ago

cc @mfossen

Pinjasaur commented 2 months ago

maybe could use https://github.com/CloudCannon/pagebreak?