feat: dynamic pages to sitemap

This commit is contained in:
Cory Dransfeldt 2024-11-25 08:37:22 -08:00
parent b208b20186
commit 308562dc7a
No known key found for this signature in database
9 changed files with 10064 additions and 67 deletions

View file

@ -78,7 +78,11 @@ json_build_object('title', CONCAT(b.title, ' by ', b.author), 'image', CONCAT('/
END) AS grid,
CASE WHEN LOWER(b.read_status) = 'finished'
AND b.star_rating IS NOT NULL THEN
json_build_object('title', b.title, 'url', CONCAT('https://coryd.dev', b.slug), 'date', b.date_finished, 'description', CASE WHEN b.review IS NOT NULL THEN
json_build_object('title', CONCAT(b.title, 'by ', b.author, CASE WHEN b.star_rating IS NOT NULL THEN
CONCAT(' (', b.star_rating, ')')
ELSE
''
END), 'url', CONCAT('https://coryd.dev', b.slug), 'date', b.date_finished, 'description', CASE WHEN b.review IS NOT NULL THEN
b.review
ELSE
b.description