Better head configuration

This commit is contained in:
Soitora 2023-07-26 01:53:30 +02:00
parent 71ba3a80c9
commit 7e730a7334
No known key found for this signature in database
GPG Key ID: A6D711EB4F2CCD97
3 changed files with 7 additions and 2 deletions

View File

@ -14,7 +14,6 @@ const head: HeadConfig[] = [
["meta", { name: "twitter:card", content: "summary" }], ["meta", { name: "twitter:card", content: "summary" }],
["meta", { name: "twitter:site", content: "@tachiyomiorg" }], ["meta", { name: "twitter:site", content: "@tachiyomiorg" }],
["meta", { name: "twitter:creator", content: "@tachiyomiorg" }], ["meta", { name: "twitter:creator", content: "@tachiyomiorg" }],
["meta", { name: "twitter:image", content: "/img/logo.png" }],
["meta", { property: "og:site_name", content: "Tachiyomi" }], ["meta", { property: "og:site_name", content: "Tachiyomi" }],
[ [

View File

@ -16,7 +16,11 @@ const generateMeta = (context: TransformContext, hostname: string) => {
if (pageData.frontmatter.type) { if (pageData.frontmatter.type) {
head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]); head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]);
} }
if (pageData.frontmatter.title) { if (pageData.frontmatter.customMetaTitle) {
head.push(["meta", { property: "og:title", content: pageData.frontmatter.customMetaTitle }]);
head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.customMetaTitle }]);
head.push(["meta", { property: "og:site_name", content: "" }]);
} else {
head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]); head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]);
head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]); head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]);
} }

View File

@ -18,6 +18,8 @@ hero:
text: Download text: Download
link: /download link: /download
customMetaTitle: Tachiyomi
features: features:
- title: Tracking - title: Tracking
details: Automatically keep track of your series with AniList, Bangumi, Kitsu, MangaUpdates, MyAnimeList, Shikimori, and more. details: Automatically keep track of your series with AniList, Bangumi, Kitsu, MangaUpdates, MyAnimeList, Shikimori, and more.