aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/pages/slide.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/pages/slide.ts')
-rw-r--r--nuldoc-src/pages/slide.ts10
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]