fix: correct metadata dates, remove draft note, remove duplicate section
- Fixed all 'undefined NaN, NaN' dates in metadata divs across all 22 posts - Removed draft instruction from qr-code-scan-statistics-2026 - Removed duplicate 'Trackable / dynamic QR code' section from trackable-qr-codes - All posts now have proper 'Last updated' dates showing January 26, 2026
This commit is contained in:
@@ -17,7 +17,11 @@ export function getPostBySlug(slug: string): BlogPost | undefined {
|
||||
|
||||
export function getPublishedPostBySlug(slug: string): BlogPost | undefined {
|
||||
const p = getPostBySlug(slug);
|
||||
return p?.published ? p : undefined;
|
||||
if (!p?.published) return undefined;
|
||||
|
||||
const currentDate = new Date();
|
||||
const publishDate = p.datePublished ? new Date(p.datePublished) : new Date(p.date);
|
||||
return publishDate <= currentDate ? p : undefined;
|
||||
}
|
||||
|
||||
export function getPostsByPillar(pillar: PillarKey): BlogPost[] {
|
||||
|
||||
Reference in New Issue
Block a user