diff options
Diffstat (limited to 'nuldoc-src/pages/post_list.ts')
| -rw-r--r-- | nuldoc-src/pages/post_list.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuldoc-src/pages/post_list.ts b/nuldoc-src/pages/post_list.ts index e8f27ee..498b3ef 100644 --- a/nuldoc-src/pages/post_list.ts +++ b/nuldoc-src/pages/post_list.ts @@ -5,6 +5,7 @@ import { postPageEntry } from "../components/post_page_entry.ts"; import { Config } from "../config.ts"; import { el, text } from "../dom.ts"; import { Page } from "../page.ts"; +import { dateToString } from "../revision.ts"; import { getPostCreatedDate, PostPage } from "./post.ts"; export type PostListPage = Page; @@ -32,8 +33,8 @@ export async function generatePostListPage( ), ), ...Array.from(posts).sort((a, b) => { - const ta = getPostCreatedDate(a); - const tb = getPostCreatedDate(b); + const ta = dateToString(getPostCreatedDate(a)); + const tb = dateToString(getPostCreatedDate(b)); if (ta > tb) return -1; if (ta < tb) return 1; return 0; |
