aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/pages/post.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/pages/post.ts')
-rw-r--r--nuldoc-src/pages/post.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/nuldoc-src/pages/post.ts b/nuldoc-src/pages/post.ts
index d870e99..24a6d5f 100644
--- a/nuldoc-src/pages/post.ts
+++ b/nuldoc-src/pages/post.ts
@@ -2,7 +2,7 @@ import { join } from "std/path/mod.ts";
import { globalFooter } from "../components/global_footer.ts";
import { globalHeader } from "../components/global_header.ts";
import { pageLayout } from "../components/page_layout.ts";
-import { Config } from "../config.ts";
+import { Config, getTagLabel } from "../config.ts";
import { el, Element, text } from "../dom.ts";
import { Document } from "../docbook/document.ts";
import { Page } from "../page.ts";
@@ -57,9 +57,7 @@ export async function generatePostPage(
"a",
[["href", `/tags/${slug}/`]],
text(
- (config.blog.tagLabels as {
- [key: string]: string;
- })[slug],
+ getTagLabel(config, slug),
),
),
)
@@ -115,9 +113,7 @@ export async function generatePostPage(
{
metaCopyrightYear: getPostCreatedDate(doc).year,
metaDescription: doc.summary,
- metaKeywords: doc.tags.map((slug) =>
- (config.blog.tagLabels as { [key: string]: string })[slug]
- ),
+ metaKeywords: doc.tags.map((slug) => getTagLabel(config, slug)),
metaTitle: `${doc.title} | ${config.blog.siteName}`,
requiresSyntaxHighlight: true,
},