-
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.
Merge pull request #67 from thegalactiks/support-homepage-template
Support homepage template for multilang websites
- Loading branch information
Showing
4 changed files
with
27 additions
and
25 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(); | ||
} |
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