diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-19 04:32:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-19 04:37:08 +0900 |
| commit | f2424f306be40e27c76def020ecb2ce1ec2aad4e (patch) | |
| tree | 4ab51d9d20707dac51a4a2be60bc476bbac9bdbd /nuldoc-src/commands/build.ts | |
| parent | ca7a609fef1167374f7c36ae87be154b0142dd47 (diff) | |
| download | blog.nsfisis.dev-f2424f306be40e27c76def020ecb2ce1ec2aad4e.tar.gz blog.nsfisis.dev-f2424f306be40e27c76def020ecb2ce1ec2aad4e.tar.zst blog.nsfisis.dev-f2424f306be40e27c76def020ecb2ce1ec2aad4e.zip | |
refactor: change type of Revision.date
Diffstat (limited to 'nuldoc-src/commands/build.ts')
| -rw-r--r-- | nuldoc-src/commands/build.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuldoc-src/commands/build.ts b/nuldoc-src/commands/build.ts index f4cb013..da7e5ce 100644 --- a/nuldoc-src/commands/build.ts +++ b/nuldoc-src/commands/build.ts @@ -5,6 +5,7 @@ import { Config } from "../config.ts"; import { parseDocBookFile } from "../docbook/parse.ts"; import { Page } from "../page.ts"; import { render } from "../render.ts"; +import { dateToString } from "../revision.ts"; import { generateAboutPage } from "../pages/about.ts"; import { generateHomePage } from "../pages/home.ts"; import { generateNotFoundPage } from "../pages/not_found.ts"; @@ -160,8 +161,8 @@ function collectTags(taggedPages: TaggedPage[]): [string, TaggedPage[]][] { result.push([ tag, tagsAndPages.get(tag).sort((a: TaggedPage, b: TaggedPage) => { - 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; |
