From 37e9a470b5e783cb7470726aa6f4504ef206cda5 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Sat, 13 Apr 2024 11:25:04 -0700 Subject: [PATCH] embeds (forgot about this) --- .vitepress/config.ts | 13 ++------ .vitepress/meta.ts | 72 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 .vitepress/meta.ts diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 76f91d0..b41d5ff 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -3,6 +3,7 @@ import { readdirSync, readFileSync, statSync } from "fs"; import { join, sep } from "path"; import { parse } from "yaml"; import { fileURLToPath } from "url"; +import metaTags from "./meta"; /** * Return an array of all filepaths in a directory @@ -61,18 +62,10 @@ export default () => { return defineConfig({ title: "Faithful Docs", description: "The official site with documentation and guides related to Faithful.", - head: [ - [ - "link", - { - rel: "icon", - href: "https://raw.githubusercontent.com/Faithful-Resource-Pack/Branding/main/site/favicon.ico", - }, - ], - ], + head: metaTags, + // https://vitepress.dev/reference/default-theme-config themeConfig: { logo: "https://raw.githubusercontent.com/Faithful-Resource-Pack/Branding/main/site/favicon.ico", - // https://vitepress.dev/reference/default-theme-config nav: [ { text: "Home", link: "/" }, ...bars, diff --git a/.vitepress/meta.ts b/.vitepress/meta.ts new file mode 100644 index 0000000..ab31bd6 --- /dev/null +++ b/.vitepress/meta.ts @@ -0,0 +1,72 @@ +const DESCRIPTION = "The official site with documentation and guides related to Faithful."; +const BANNER_URL = + "https://database.faithfulpack.net/images/branding/site/banners/universal_banner.png"; + +export default [ + // html meta tags + [ + "link", + { + rel: "icon", + href: "https://raw.githubusercontent.com/Faithful-Resource-Pack/Branding/main/site/favicon.ico", + }, + ], + [ + "meta", + { + name: "theme-color", + content: "#76C945", + }, + ], + [ + "meta", + { + name: "description", + content: DESCRIPTION, + }, + ], + // open graph meta tags + [ + "meta", + { + property: "og:type", + content: "website", + }, + ], + [ + "meta", + { + property: "og:description", + content: DESCRIPTION, + }, + ], + [ + "meta", + { + property: "og:image", + content: BANNER_URL, + }, + ], + // twitter meta tags + [ + "meta", + { + name: "twitter:card", + content: "summary_large_image", + }, + ], + [ + "meta", + { + name: "twitter:description", + content: DESCRIPTION, + }, + ], + [ + "meta", + { + name: "twitter:image", + content: BANNER_URL, + }, + ], +] as [string, Record][];