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/pages/slide.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/pages/slide.ts')
| -rw-r--r-- | nuldoc-src/pages/slide.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/nuldoc-src/pages/slide.ts b/nuldoc-src/pages/slide.ts index 2b7e202..f2955af 100644 --- a/nuldoc-src/pages/slide.ts +++ b/nuldoc-src/pages/slide.ts @@ -5,7 +5,7 @@ import { pageLayout } from "../components/page_layout.ts"; import { Config } from "../config.ts"; import { el, text } from "../dom.ts"; import { Page } from "../page.ts"; -import { Revision } from "../revision.ts"; +import { dateToString, Revision } from "../revision.ts"; import { Slide } from "../slide/slide.ts"; import { getPostCreatedDate } from "./post.ts"; @@ -82,8 +82,8 @@ export async function generateSlidePage( [["class", "revision"]], el( "time", - [["datetime", rev.date]], - text(rev.date), + [["datetime", dateToString(rev.date)]], + text(dateToString(rev.date)), ), text(`: ${rev.remark}`), ) @@ -119,9 +119,7 @@ export async function generateSlidePage( const html = await pageLayout( { - metaCopyrightYear: parseInt( - getPostCreatedDate(slide).substring(0, 4), - ), + metaCopyrightYear: getPostCreatedDate(slide).year, metaDescription: slide.title, metaKeywords: slide.tags.map((slug) => (config.blog.tagLabels as { [key: string]: string })[slug] |
