Skip to content

Commit

Permalink
Add missing trailing slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
simpledemon committed Mar 12, 2024
1 parent e426437 commit 79544c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/setpieces/Sidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ for (const page of allPages) {
{nameOverride?.[url] ||
mappedPages[url]?.frontmatter?.title ||
mappedPages[url]?.title ||
url.split("/").slice(-1)}
url.split("/").slice(-2)}
</a>
</li>
))}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/en/changelog/[project]/[version].astro
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for (const project of fs.readdirSync("cache/changelogs")) {
const sidebar = objectMap(versions, (project, projectVersions) => {
return {
pages: projectVersions.map((version) => `/en/changelog/${project}/${version}`)
pages: projectVersions.map((version) => `/en/changelog/${project}/${version}/`)
}
})
Expand Down Expand Up @@ -72,13 +72,13 @@ const body = changelogs.find((changelog) => changelog.file.endsWith(`/${project}
<Sidebar
value={{
"sidebar-pages": {
pages: ["/en/changelog"],
pages: ["/en/changelog/"],
subPages: sidebar
}
}
}}
nameOverride={{
"/en/changelog": "Index"
"/en/changelog/": "Index"
}}
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/en/changelog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for (const project of fs.readdirSync("cache/changelogs")) {
const sidebar = objectMap(versions, (project, projectVersions) => {
return {
pages: projectVersions.map((version) => `/en/changelog/${project}/${version}`)
pages: projectVersions.map((version) => `/en/changelog/${project}/${version}/`)
}
})
---
Expand All @@ -39,12 +39,12 @@ const sidebar = objectMap(versions, (project, projectVersions) => {
<Sidebar
value={{
"sidebar-pages": {
pages: ["/en/changelog"],
pages: ["/en/changelog/"],
subPages: sidebar
}
}}
nameOverride={{
"/en/changelog": "Index"
"/en/changelog/": "Index"
}}
/>
</div>
Expand All @@ -58,7 +58,7 @@ const sidebar = objectMap(versions, (project, projectVersions) => {
<h2 style="text-transform: capitalize">{project}</h2>
<ul>
{projectVersions.map((version) => (
<li><a href={`/en/changelog/${project}/${version}`}>{version}</a></li>
<li><a href={`/en/changelog/${project}/${version}/`}>{version}</a></li>
))}
</ul>
</div>
Expand Down

0 comments on commit 79544c5

Please sign in to comment.