Skip to content

Commit c773609

Browse files
committed
coderabbit
1 parent 018579f commit c773609

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/pages/[section]/[...page].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const { Content } = await render(entry)
7474
7575
if (tabsDictionary[id]) {
7676
// if tab exists, rewrite to first tab content
77-
return Astro.rewrite(`/${section}/${kebabCase(id)}/${tabsDictionary[id][0]}`)
77+
return Astro.rewrite(`/${kebabCase(section)}/${kebabCase(id)}/${tabsDictionary[id][0]}`)
7878
}
7979
---
8080

src/pages/[section]/[page]/[tab].astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ export async function getStaticPaths() {
7777
}
7878
7979
const { entry, propComponents, cssPrefix } = Astro.props
80-
const { title, id, section } = entry.data
80+
const { title, id, section: rawSection } = entry.data
81+
const section = kebabCase(rawSection)
8182
8283
const { Content } = await render(entry)
8384
const currentPath = Astro.url.pathname

0 commit comments

Comments
 (0)