mirror of
https://github.com/fmhy/edit.git
synced 2026-02-19 17:51:17 +11:00
somewhat fix meta
h
This commit is contained in:
parent
d3d5858b13
commit
2b65bc9332
7 changed files with 42 additions and 47 deletions
|
|
@ -10,13 +10,9 @@ export function generateMeta(context: TransformContext, hostname: string) {
|
|||
head.push(["meta", { property: "og:url", content: url }]);
|
||||
head.push(["meta", { name: "twitter:url", content: url }]);
|
||||
head.push(["meta", { name: "twitter:card", content: "summary_large_image" }]);
|
||||
head.push(["meta", { name: "theme-color", content: "#7bc5e4" }]);
|
||||
head.push(["meta", { property: "og:type", content: "website" }]);
|
||||
|
||||
if (pageData.frontmatter.theme) {
|
||||
head.push(["meta", { name: "theme-color", content: pageData.frontmatter.theme }]);
|
||||
}
|
||||
if (pageData.frontmatter.type) {
|
||||
head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]);
|
||||
}
|
||||
if (pageData.frontmatter.description) {
|
||||
head.push([
|
||||
"meta",
|
||||
|
|
@ -52,18 +48,7 @@ export function generateMeta(context: TransformContext, hostname: string) {
|
|||
},
|
||||
]);
|
||||
}
|
||||
if (pageData.frontmatter.tag) {
|
||||
head.push(["meta", { property: "article:tag", content: pageData.frontmatter.tag }]);
|
||||
}
|
||||
if (pageData.frontmatter.date) {
|
||||
head.push([
|
||||
"meta",
|
||||
{
|
||||
property: "article:published_time",
|
||||
content: pageData.frontmatter.date,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
if (pageData.lastUpdated && pageData.frontmatter.lastUpdated !== false) {
|
||||
head.push([
|
||||
"meta",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue