aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/commands
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-03-17 02:27:53 +0900
committernsfisis <nsfisis@gmail.com>2023-03-17 02:27:53 +0900
commitec2ae41b815c4c465a856d800709de6147e5e54f (patch)
treeab05d0e2971cdbcfa55e531e6d977cc552c7adf5 /nuldoc-src/commands
parent29bcdc6c1bad2240d404de9dca2463e46fdc1e93 (diff)
downloadblog.nsfisis.dev-ec2ae41b815c4c465a856d800709de6147e5e54f.tar.gz
blog.nsfisis.dev-ec2ae41b815c4c465a856d800709de6147e5e54f.tar.zst
blog.nsfisis.dev-ec2ae41b815c4c465a856d800709de6147e5e54f.zip
refactor: make Document type class
Diffstat (limited to 'nuldoc-src/commands')
-rw-r--r--nuldoc-src/commands/build.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuldoc-src/commands/build.ts b/nuldoc-src/commands/build.ts
index 734f520..8765802 100644
--- a/nuldoc-src/commands/build.ts
+++ b/nuldoc-src/commands/build.ts
@@ -117,8 +117,8 @@ function collectTags(posts: Document[]): [string, Document[]][] {
result.push([
tag,
tagsAndPosts.get(tag).sort((a: Document, b: Document) => {
- const ta = a.revisions[0].date;
- const tb = b.revisions[0].date;
+ const ta = a.getCreatedDate();
+ const tb = b.getCreatedDate();
if (ta > tb) return -1;
if (ta < tb) return 1;
return 0;