From ff0822088d9cc37e211e8ba0671ace52acb300bb Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Sun, 12 Nov 2023 23:18:18 +0530 Subject: [PATCH] fix toolsguide --- .github/add-headers.py | 2 +- .vitepress/hooks/meta.ts | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/add-headers.py b/.github/add-headers.py index c1340569a..d2644fd92 100644 --- a/.github/add-headers.py +++ b/.github/add-headers.py @@ -16,7 +16,7 @@ headersData = { "Non-English.md": ["Non-English", "International Piracy Sites"], "ReadingPiracyGuide.md": ["Books / Comics / Manga", "Books, Comics, Magazines, Newspapers"], "STORAGE.md": ["Storage", "Index for everything in the wiki."], - "TOOLSGuide.md": ["Tools", "General Tools, Internet Tools, System Tools"], + # "TOOLSGuide.md": ["Tools", "General Tools, Internet Tools, System Tools"], "TorrentPiracyGuide.md": ["Torrenting", "Torrent Clients, Torrent Sites, Trackers"], "VideoPiracyGuide.md": ["Movies / TV / Anime", "Stream Videos, Download Videos, Torrent Videos"], "base64.md": ["Base64", "Base64 storage"], diff --git a/.vitepress/hooks/meta.ts b/.vitepress/hooks/meta.ts index 83353c23a..2f4242606 100644 --- a/.vitepress/hooks/meta.ts +++ b/.vitepress/hooks/meta.ts @@ -13,22 +13,22 @@ export function generateMeta(context: TransformContext, hostname: string) { head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]); head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]); - - head.push([ - "meta", - { - property: "og:description", - content: pageData.frontmatter.description, - }, - ]); - head.push([ - "meta", - { - name: "twitter:description", - content: pageData.frontmatter.description, - }, - ]); - + if (pageData.frontmatter.description) { + head.push([ + "meta", + { + property: "og:description", + content: pageData.frontmatter.description, + }, + ]); + head.push([ + "meta", + { + name: "twitter:description", + content: pageData.frontmatter.description, + }, + ]); + } if (pageData.frontmatter.image) { head.push([ "meta",