How do I adjust the pagination?

One of my blogs contains only long posts, so loading 25 of them at a time takes “forever” (seconds).

So, how do I adjust the pagination of a blog hosted on micro∙blog?

See Pagination | Hugo

For the configuration options for pagination.

Sorry, I don’t understand Hugo. I tried several times in the past years, but it’s clearly beyond me.

I’m planning to move the current pagination settings (under Design) to a plug-in. I think that would be a good opportunity for us to add some additional settings. Number of posts makes a lot of sense to add.

It’d probably be worth taking all of the settings in the default json + some common ones that are edited by specific themes (like pagination) and making an easy interface for that using the existing ability for plugins to have numbers, booleans, and text fields for key-values.

I forgot that I already wrote a plug-in for changing the number of posts for pagination. You can install it under Plug-ins → Find Plug-ins.

https://micro.blog/account/plugins/view/87

1 Like

Thanks, @manton ! It works like a charm :blush:

Should this work on the photos page? I have se the Number of posts per page to 25 but my photos page is still showing all photos.

The pagination does not apply to the photos page, which does show all photos by default. I think it should be possible to create a separate theme or plug-in to change the behavior of photos, but there’s not anything like that yet that I’ve seen.

I’d say, the way Photos page work right now, loading all the HTML then doing a lazy load of images themselves, doesn’t seem ideal for blogs that have been online for a while.

Manton’s own photo page is a good example, just look at the size of that scroll bar.

I can live with my own for now, but I guess one day I’ll have to add some JQuery to this page to make this more bearable :slight_smile:

1 Like

That’s fair. I think photos probably needs to adapt to having pagination similar to the option on the home or category pages. Maybe it’s time to make “photos” a true post type in Hugo.

Pagination could be another option for sure!

1 Like