From 4c00fc5e22fcf9b588399da896cda26fffb8ef42 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Fri, 12 Apr 2024 11:57:07 +0900 Subject: [PATCH] Open Graph metadata on docs --- docs/.vitepress/config.mts | 21 +++++++++++++++++++++ docs/index.md | 3 +++ 2 files changed, 24 insertions(+) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 4551d7f5..eaaf3b53 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -128,6 +128,14 @@ export default defineConfig({ href: "/favicon-32x32.png", }, ], + [ + "meta", + { + property: "og:image", + content: + "https://repository-images.githubusercontent.com/766072261/03a63032-03aa-481e-aa31-091809a49043", + }, + ], ...plausibleScript, ], @@ -141,4 +149,17 @@ export default defineConfig({ md.use(jsrRefPlugin); }, }, + + async transformHead(context) { + return [ + [ + "meta", + { property: "og:title", content: context.title }, + ], + [ + "meta", + { property: "og:description", content: context.description }, + ], + ]; + }, }); diff --git a/docs/index.md b/docs/index.md index d4ca2a07..126eaad1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,8 @@ --- layout: home +description: >- + Fedify is a TypeScript library for building federated server apps powered by + ActivityPub and other standards, so-called fediverse. hero: name: Fedify