Skip to content

Commit

Permalink
fix: Adds missing description meta tag
Browse files Browse the repository at this point in the history
OllieJT committed Jul 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c0b56fa commit 351df70
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-numbers-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"schemeta": patch
---

Adds missing description meta tag
8 changes: 6 additions & 2 deletions src/use.description.ts
Original file line number Diff line number Diff line change
@@ -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[];
};

0 comments on commit 351df70

Please sign in to comment.