Pagination with numbers instead of next/previous

hey guys,

I have pagination working nicely on my blog.

But I would like to have a list of page numbers instead of the standard next/previous buttons.

How would be this be possible with kirby?

My current code is

				<?php if($articles->pagination()->hasPages()): ?>
		<nav class="pagination">
  			<?php if($articles->pagination()->hasNextPage()): ?>
  				<a class="next" href="<?php echo $articles->pagination()->nextPageURL() ?>">Next Page &lsaquo; </a>
  			<?php endif ?>
  			<?php if($articles->pagination()->hasPrevPage()): ?>
  				<a class="prev" href="<?php echo $articles->pagination()->prevPageURL() ?>">Previous Page &rsaquo;</a>
  			<?php endif ?>
	<?php endif ?>

Thank you for any help!

If anyone else wants the same thing.

This document here has everything you need.

You can try using $pagination->toArray() and then foreach page list it.
All the pagination helpers are explained here:

If you want to have pagination with a page range, check out this blog post.