-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@galactiks/astro-integration): support multilanguage move from homepa…
…ge to index page
- Loading branch information
1 parent
0b41875
commit 4d06818
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { getDefaultLanguage, getLanguages } from '@galactiks/config'; | ||
import { getLanguages } from '@galactiks/config'; | ||
import { | ||
getAllPagesExceptHome, | ||
getHomePage as explorerGetHomePage, | ||
getPages, | ||
getIndexPage as explorerGetIndexPage, | ||
} from '@galactiks/explorer'; | ||
|
||
export async function getStaticPaths() { | ||
return (await getAllPagesExceptHome({ inLanguages: getLanguages() })).map( | ||
(page) => ({ | ||
return (await getPages({ inLanguages: getLanguages() })) | ||
.filter((_p) => _p.slug !== '') | ||
.map((page) => ({ | ||
params: { path: page.path.slice(1) }, | ||
props: { page }, | ||
}) | ||
); | ||
})); | ||
} | ||
|
||
export function getHomePage() { | ||
return explorerGetHomePage({ inLanguage: getDefaultLanguage() }); | ||
export function getIndexPage() { | ||
return explorerGetIndexPage(); | ||
} |