From 351df707a5c7b1616a3a1dc7390a39cffc9b0d5b Mon Sep 17 00:00:00 2001 From: Ollie Taylor <13766232+OllieJT@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:59:47 +0100 Subject: [PATCH] fix: Adds missing description meta tag --- .changeset/fluffy-numbers-judge.md | 5 +++++ src/use.description.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/fluffy-numbers-judge.md diff --git a/.changeset/fluffy-numbers-judge.md b/.changeset/fluffy-numbers-judge.md new file mode 100644 index 0000000..2de8867 --- /dev/null +++ b/.changeset/fluffy-numbers-judge.md @@ -0,0 +1,5 @@ +--- +"schemeta": patch +--- + +Adds missing description meta tag diff --git a/src/use.description.ts b/src/use.description.ts index 31f3445..a315d79 100644 --- a/src/use.description.ts +++ b/src/use.description.ts @@ -1,6 +1,10 @@ -import type { MetadataElement, OpenGraph, Twitter } from "./types/tags.js"; +import type { MetadataElement, OpenGraph, Twitter, Web } from "./types/tags.js"; export const use_description = (description: string) => { + const desc: Web.Description = { + element: "meta", + attributes: { name: "description", content: description }, + }; const og_desc: OpenGraph.Description = { element: "meta", attributes: { property: "og:description", content: description }, @@ -10,5 +14,5 @@ export const use_description = (description: string) => { attributes: { name: "twitter:description", content: description }, }; - return [og_desc, tw_desc] satisfies MetadataElement[]; + return [desc, og_desc, tw_desc] satisfies MetadataElement[]; };