diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-17 02:27:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-17 02:27:53 +0900 |
| commit | ec2ae41b815c4c465a856d800709de6147e5e54f (patch) | |
| tree | ab05d0e2971cdbcfa55e531e6d977cc552c7adf5 /nuldoc-src/commands/build.ts | |
| parent | 29bcdc6c1bad2240d404de9dca2463e46fdc1e93 (diff) | |
| download | blog.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/build.ts')
| -rw-r--r-- | nuldoc-src/commands/build.ts | 4 |
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; |
