Find out what page number a post is on

Is there any way to find what page number a post is on? So say you are on:

sitename/page/3

You might click a post and end up here:

sitename/interesting-post/

Currently I have a back button on “sitename/interesting-post/” that sends you to “sitename”. I would like it to send you to “sitename/page/3” instead. Anybody know if that’s possible to do?

Thanks!

P.S. I’m loving HUGO, most fun I’ve ever had making websites :slight_smile:

Not possible. And even if it were possible: A page can be a member of several paginators, so you would have to pick one … I would suggest you use JavaScript and the browser history to take the user back.

Ah I thought that might be the case. I’ll look in to a javascript solution :slight_smile: