Commit Graph

14 Commits

Author SHA1 Message Date
Tomas Dvorak 4c904a1546 fix(backend): improve video resilience and add blog ordering validation
Implement fallback mechanisms for YouTube video data and add startup
validation for blog post ordering.

- Add `loadVideosJSON` to persist and reload video data from disk.
- Update `refreshVideos` to retain existing local videos if the YouTube
  API returns an empty response.
- Add `validateBlogOrdering` to perform a health check on blog post
  sequence during startup.
- Call video loading and blog validation in `main`.
2026-05-11 15:30:24 +02:00
Tomas Dvorak 76c447a395 fix(ui): add defensive sorting for blog posts
Implement client-side sorting for blog post lists to ensure they are
displayed in descending order by numeric ID. This prevents issues
where API response ordering or file modification timestamps might
cause older posts to appear newer than recent ones.

Also add backend tests to verify blog ordering logic.
2026-05-11 13:03:04 +02:00
Tomas Dvorak a6b47de1a4 refactor(backend): improve blog canonical ID resolution
Refactor the blog listing logic to use a canonical numeric ID when available. This ensures consistent identity and deduplication between numeric and slug-based filenames, and ensures image path resolution uses the correct identifier.
2026-05-11 12:33:26 +02:00
Your Name 2f65bc03e6 rybbit 2026-04-18 14:30:18 +02:00
Your Name ac9930767e new sponsor and fix backend 2026-04-09 15:43:28 +02:00
Tomas Dvorak 4f3164956a Add slug-to-numeric resolution for blog URLs
- Modified blog handler to resolve slugs to numeric files when slug files don't exist
- This allows slug URLs to work without creating duplicate slug files
- Fixes sorting issues while maintaining slug URL compatibility
2026-03-14 11:27:08 +01:00
Tomas Dvorak f8a6abf391 Fix blog sorting to show newest first
- When files have recent timestamps (from setup script), sort by numeric ID
- Higher numeric IDs represent newer blogs
- This ensures proper chronological ordering in admin interface
2026-03-14 11:21:31 +01:00
Tomas Dvorak 45facf7aa0 Fix image paths and remove duplicate slug files
- Remove duplicate slug files that were causing duplicate entries
- Add logic to find corresponding numeric ID for image paths
- This fixes broken images in admin interface for slug-based blogs
2026-03-14 11:19:09 +01:00
Tomas Dvorak c9c322ff95 Fix duplicate blog entries and image paths
- Add deduplication logic to avoid showing same blog twice
- Add extractBlogID function to get correct numeric ID from meta tags
- Use blogID for image paths instead of filename ID
- This fixes duplicate entries in admin interface and broken images
2026-03-14 11:17:49 +01:00
Tomas Dvorak 3a7c1bbcba Fix blog API endpoints and path issues
- Fix listLatestBlogs function to use correct blog directory path
- Add /data/blog-list.json endpoint for frontend blog listing
- Update remoteBlogDir references to use blogDir
- Resolve blog listing and admin interface loading issues
2026-03-14 11:12:40 +01:00
Tomas Dvorak 21574a8b30 Add slug support and new admin features 2026-03-14 10:40:04 +01:00
Tomáš Dvořák 71942e45b9 update 2025-09-23 20:15:36 +02:00
Tomas Dvorak 91947a53b5 efe 2025-09-08 17:13:01 +02:00
Tomáš Dvořák fcb9f2d60c automated 2025-08-26 09:18:40 +02:00