Skip to content

Commit

Permalink
fix: homepage source path
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquin Montes committed Jul 19, 2023
1 parent 32b8acb commit 6a83b61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/validate-docs-links/lib/index.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .github/actions/validate-docs-links/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ async function getAllMdxFilePaths(): Promise<RouteFragment[]> {
...sidebarReference.map(group => ({...group, slug: path.join('reference/', group.slug)}))
]

let allRoutes: RouteSchema[] = [{source: 'home.mdx', slug: '/', label: 'Homepage'}]
let allRoutes: RouteSchema[] = [{source: './home.mdx', slug: '', label: 'Homepage'}]
for (const group of config) {
allRoutes = allRoutes.concat(group.routes.map(route => ({
...route,
slug: path.join('.', group.slug, route.slug)
slug: path.join(group.slug, route.slug),
source: path.join('.', route.source)
})))
}
footer.forEach(item => 'source' in item && allRoutes.push({...item, source: path.join('.', item.source)}))
Expand Down

0 comments on commit 6a83b61

Please sign in to comment.