From 8ea9a599b5783d2cddeab235d541748e72cb4bcb Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 24 Feb 2024 18:09:59 +0900 Subject: feat(blog/nuldoc): add `rel=alternate` link --- vhosts/blog/nuldoc-src/components/page_layout.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vhosts/blog/nuldoc-src/components') diff --git a/vhosts/blog/nuldoc-src/components/page_layout.ts b/vhosts/blog/nuldoc-src/components/page_layout.ts index 5582c405..90eb3b2c 100644 --- a/vhosts/blog/nuldoc-src/components/page_layout.ts +++ b/vhosts/blog/nuldoc-src/components/page_layout.ts @@ -7,6 +7,7 @@ type Params = { metaDescription: string; metaKeywords: string[]; metaTitle: string; + metaAtomFeedHref?: string; requiresSyntaxHighlight: boolean; }; @@ -16,6 +17,7 @@ export async function pageLayout( metaDescription, metaKeywords, metaTitle, + metaAtomFeedHref, requiresSyntaxHighlight, }: Params, body: Element, @@ -64,6 +66,9 @@ export async function pageLayout( ["property", "og:locale"], ["content", "ja_JP"], ]), + ...(metaAtomFeedHref + ? [linkElement("alternate", metaAtomFeedHref, "application/atom+xml")] + : []), linkElement("icon", "/favicon.svg", "image/svg+xml"), el("title", [], text(metaTitle)), await stylesheetLinkElement("/style.css", config), -- cgit v1.2.3-70-g09d2