diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-09-20 19:56:52 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-09-20 19:56:57 +0900 |
| commit | a84908b7e8a0e2423afd6b836eccf27a420270b4 (patch) | |
| tree | 00204b62358f8c57fcb36f601db360626484cc1a /vhosts/blog/nuldoc-src/pages/post.ts | |
| parent | 0b488f85380f964c40b0b9aae69c6611bc7978bc (diff) | |
| download | nsfisis.dev-a84908b7e8a0e2423afd6b836eccf27a420270b4.tar.gz nsfisis.dev-a84908b7e8a0e2423afd6b836eccf27a420270b4.tar.zst nsfisis.dev-a84908b7e8a0e2423afd6b836eccf27a420270b4.zip | |
feat(blog/nuldoc): change content format from DocBook to NulDoc
Diffstat (limited to 'vhosts/blog/nuldoc-src/pages/post.ts')
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/post.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vhosts/blog/nuldoc-src/pages/post.ts b/vhosts/blog/nuldoc-src/pages/post.ts index 24a6d5f5..ade0916a 100644 --- a/vhosts/blog/nuldoc-src/pages/post.ts +++ b/vhosts/blog/nuldoc-src/pages/post.ts @@ -4,13 +4,13 @@ import { globalHeader } from "../components/global_header.ts"; import { pageLayout } from "../components/page_layout.ts"; import { Config, getTagLabel } from "../config.ts"; import { el, Element, text } from "../dom.ts"; -import { Document } from "../docbook/document.ts"; +import { Document } from "../ndoc/document.ts"; import { Page } from "../page.ts"; import { Date, dateToString, Revision } from "../revision.ts"; export interface PostPage extends Page { title: string; - summary: string; + description: string; tags: string[]; revisions: Revision[]; } @@ -112,7 +112,7 @@ export async function generatePostPage( const html = await pageLayout( { metaCopyrightYear: getPostCreatedDate(doc).year, - metaDescription: doc.summary, + metaDescription: doc.description, metaKeywords: doc.tags.map((slug) => getTagLabel(config, slug)), metaTitle: `${doc.title} | ${config.blog.siteName}`, requiresSyntaxHighlight: true, @@ -124,7 +124,7 @@ export async function generatePostPage( const cwd = Deno.cwd(); const contentDir = join(cwd, config.locations.contentDir); const destFilePath = join( - doc.sourceFilePath.replace(contentDir, "").replace(".xml", ""), + doc.sourceFilePath.replace(contentDir, "").replace(".ndoc", ""), "index.html", ); return { @@ -133,7 +133,7 @@ export async function generatePostPage( destFilePath: destFilePath, href: destFilePath.replace("index.html", ""), title: doc.title, - summary: doc.summary, + description: doc.description, tags: doc.tags, revisions: doc.revisions, }; |
