Skip to content

Commit

Permalink
[pages/slug,#525][xs]: fix sidebar links
Browse files Browse the repository at this point in the history
  • Loading branch information
olayway committed Jun 21, 2023
1 parent 9e42c0b commit e674259
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/[[...slug]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ function capitalize(str: string) {
// we should generate a file with sitemap instead of computing it on the fly for each page
/* function addPageToGroup(page: MddbFile, sitemap: Array<NavGroup>) { */
function addPageToSitemap(page: any, sitemap: Array<NavGroup | NavItem>) {
const urlParts = page.url_path!.split("/").filter((part) => part);
const urlDecoded = decodeURI(page.url_path);
const urlParts = urlDecoded!.split("/").filter((part) => part);
// don't add home page to the sitemap
if (urlParts.length === 0) return;
// top level, root pages
Expand Down

0 comments on commit e674259

Please sign in to comment.