diff --git a/.vitepress/hooks/opengraph.ts b/.vitepress/hooks/opengraph.ts
index 224fd9122..719fd5093 100644
--- a/.vitepress/hooks/opengraph.ts
+++ b/.vitepress/hooks/opengraph.ts
@@ -40,9 +40,7 @@ export async function generateImages(config: SiteConfig) {
},
];
- const filteredPages = pages.filter((p) => p.frontmatter.image === undefined);
-
- for (const page of filteredPages) {
+ for (const page of pages) {
await generateImage({
page,
template,
@@ -59,17 +57,6 @@ interface GenerateImagesOptions {
fonts: SatoriOptions["fonts"];
}
-function getDir(url: string) {
- if (url.startsWith("/glossary/")) {
- return "Glossary";
- } else if (url.startsWith("/guides/")) {
- return "Guide";
- }
-
- // Means we are at root.
- return undefined;
-}
-
async function generateImage({ page, template, outDir, fonts }: GenerateImagesOptions) {
const { frontmatter, url } = page;
@@ -86,7 +73,6 @@ async function generateImage({ page, template, outDir, fonts }: GenerateImagesOp
frontmatter.layout === "home"
? frontmatter.hero.tagline ?? frontmatter.description
: frontmatter.description,
- dir: getDir(url),
},
};