From 5cd41e1b518a08b984f2f460e46953bad7c324dd Mon Sep 17 00:00:00 2001 From: lew Date: Thu, 26 Mar 2026 19:24:21 +0000 Subject: [PATCH] fix: use creation date for .txt posts rather than modified date --- www/src/lib/txt.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/src/lib/txt.ts b/www/src/lib/txt.ts index b5475a6..d38129f 100644 --- a/www/src/lib/txt.ts +++ b/www/src/lib/txt.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import path from 'node:path'; import yaml from 'js-yaml'; import { sortByPinnedThenDate } from './format'; -import { getGitLastModifiedDate } from './git'; +import { getGitCreationDate } from './git'; export interface TxtFile { name: string; @@ -39,7 +39,7 @@ export function getTxtFiles(): TxtFile[] { .filter(file => file.endsWith('.txt')) .map(name => ({ name, - date: getGitLastModifiedDate(path.join(txtDir, name)), + date: getGitCreationDate(path.join(txtDir, name)), pinned: pinnedSet.has(name), description: descriptions[name], }));