From e0a8e1b595dd5a636f49edce7c08b2fd12c1e452 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 21 Jun 2025 15:03:29 +0900 Subject: feat(blog/nuldoc): implement pagination --- vhosts/blog/nginx.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vhosts/blog/nginx.conf') diff --git a/vhosts/blog/nginx.conf b/vhosts/blog/nginx.conf index 7cc8bda1..eb1d9136 100644 --- a/vhosts/blog/nginx.conf +++ b/vhosts/blog/nginx.conf @@ -18,7 +18,10 @@ server { error_page 404 /404.html; - # Old URLs. + # Redirect to canonical path. + rewrite ^/posts/1/?$ /posts/ permanent; + + # Old URL patterns. rewrite ^/posts/(my-first-post)/?$ /posts/2021-03-05/$1/ permanent; rewrite ^/posts/(phperkaigi-2021)/?$ /posts/2021-03-30/$1/ permanent; rewrite ^/posts/(cpp-you-can-use-keywords-in-attributes)/?$ /posts/2021-10-02/$1/ permanent; @@ -33,5 +36,6 @@ server { # I mistakenly wrote 2023 in the URL instead of 2024. rewrite ^/posts/2023-01-10/(neovim-insert-namespace-declaration-to-empty-php-file)/?$ /posts/2024-01-10/$1/ permanent; + # Renamed posts. rewrite ^/posts/2024-03-20/todos-in-my-life/?$ /posts/2024-03-20/my-bucket-list/ permanent; } -- cgit v1.2.3-70-g09d2