Skip to content

Commit

Permalink
fix: bug with pre-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Oct 11, 2024
1 parent 28be051 commit f0dad96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function getStaticPaths() {
// path is the catch all route, so it must be array with url segments
// if you don't want to support date urls just remove the date from the path
params: {
site: site.host,
site: site?.slug ?? site.host,
path: removeSourceUrl({ link, backendUrl: site.sourceUrl })
.substring(1)
.split('/'),
Expand All @@ -75,7 +75,7 @@ export async function getStaticPaths() {
return {
// path is the catch all route, so it must be array with url segments
params: {
site: site.host,
site: site?.slug ?? site.host,
path: normalizedLink.substring(1).split('/'),
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const getStaticPaths = async () => {
return {
paths: sites.map((site) => ({
params: {
site: site.host,
site: site?.slug ?? site.host,
},
})),
fallback: true,
Expand Down

0 comments on commit f0dad96

Please sign in to comment.