serve a list's ?page=N from its own page, or the spa when it wasn't rendered
Signed-off-by: dawn <90008@klbr.net>
3 unmodified lines45678910111213141516171818 unmodified lines3 unmodified lines root <out>/www; # pages are stored gzipped next to an empty stub, so try_files sees the name gzip_static always; gunzip on; # a later page of a list is <list>~page-N.html: the uri is rewritten to that name and # comes back through here (rewrite last is what's safe inside an if). one the renderer # didn't keep goes to the SPA, never to page 1 if ($arg_page ~ "^0*([2-9]|[1-9][0-9]+)$") { set $page $1; rewrite ^(.*)$ "$1~page-$page?" last; } # a file or folder page is <path>.html, the repo's front page <repo>/index.html try_files $uri.html $uri/index.html @spa;}# what all of a repo's pages share, named by content, so it never changes under a name18 unmodified lines