From 4f3ce84a4a753ef323836662294cb13cbb7f1862 Mon Sep 17 00:00:00 2001 From: mashehu Date: Sat, 3 Feb 2024 15:12:42 +0100 Subject: [PATCH] fix subsection names --- src/pages/tools/docs/[version]/[...slug].astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/tools/docs/[version]/[...slug].astro b/src/pages/tools/docs/[version]/[...slug].astro index 1ab30ce838..30509a266a 100644 --- a/src/pages/tools/docs/[version]/[...slug].astro +++ b/src/pages/tools/docs/[version]/[...slug].astro @@ -14,10 +14,10 @@ export async function getStaticPaths() { section_name: entry, section_slug: entry.replace(/\.md$/, ''), children: versioned_tools - .filter((child) => child.id.split('/')[2] === entry) + .filter((child) => child.id.split('/')[2] === entry && child.id.split('/')[3]) .map((tool_entry) => { return { - title: tool_entry.child.id.split('/')[3].replace(/\.md$/, ''), + title: tool_entry.id.split('/')[3].replace(/\.md$/, ''), slug: '/tools/' + tool_entry.id.replace(/\.md$/, ''), }; }),