fix: use creation date for .txt posts rather than modified date
This commit is contained in:
parent
705a5a39f3
commit
5cd41e1b51
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import { sortByPinnedThenDate } from './format';
|
import { sortByPinnedThenDate } from './format';
|
||||||
import { getGitLastModifiedDate } from './git';
|
import { getGitCreationDate } from './git';
|
||||||
|
|
||||||
export interface TxtFile {
|
export interface TxtFile {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
@ -39,7 +39,7 @@ export function getTxtFiles(): TxtFile[] {
|
||||||
.filter(file => file.endsWith('.txt'))
|
.filter(file => file.endsWith('.txt'))
|
||||||
.map(name => ({
|
.map(name => ({
|
||||||
name,
|
name,
|
||||||
date: getGitLastModifiedDate(path.join(txtDir, name)),
|
date: getGitCreationDate(path.join(txtDir, name)),
|
||||||
pinned: pinnedSet.has(name),
|
pinned: pinnedSet.has(name),
|
||||||
description: descriptions[name],
|
description: descriptions[name],
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue