aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/pages/og/[slug].png.ts19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/pages/og/[slug].png.ts b/src/pages/og/[slug].png.ts
index a743efe..67896d9 100644
--- a/src/pages/og/[slug].png.ts
+++ b/src/pages/og/[slug].png.ts
@@ -30,6 +30,7 @@ const pages: Record<string, string> = {
"vaccine-kyuusai-tekiseika": "ワクチン副反応救済制度の適正化の軌跡",
"dislexia-taiou": "ディスレクシア(読み書き障害)対応の軌跡",
"ippan-situmon": "一般質問",
+ media: "メディア掲載",
};
function findMdxFiles(dir: string): string[] {
@@ -59,14 +60,16 @@ export async function getStaticPaths() {
const slugs = new Set<string>();
// Manual pages
for (const s of Object.keys(pages)) slugs.add(s);
- // Auto-discover ippan-situmon pages
- for (const f of findMdxFiles(path.join(contentDir, "ippan-situmon"))) {
- const s = f
- .replace(/\\/g, "/")
- .replace(contentDir + "/", "")
- .replace(/\.mdx$/, "")
- .replace(/\/index$/, "");
- if (s) slugs.add(s);
+ // Auto-discover ippan-situmon / iinkai pages
+ for (const dir of ["ippan-situmon", "iinkai"]) {
+ for (const f of findMdxFiles(path.join(contentDir, dir))) {
+ const s = f
+ .replace(/\\/g, "/")
+ .replace(contentDir + "/", "")
+ .replace(/\.mdx$/, "")
+ .replace(/\/index$/, "");
+ if (s) slugs.add(s);
+ }
}
return [...slugs]
.filter((s) => s.length > 0)