-
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.
Use code generator to generate unique pages for multi-languague SEO
- Loading branch information
Ellet
committed
Dec 9, 2023
1 parent
b2b153c
commit 272f7bc
Showing
5 changed files
with
57 additions
and
9 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
3 changes: 1 addition & 2 deletions
3
site/src/jsMain/kotlin/net/freshplatform/alrayada_landing_page/core/router/AppRouter.kt
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,8 +1,7 @@ | ||
package net.freshplatform.alrayada_landing_page.core.router | ||
|
||
object AppRouter { | ||
// Unfortunately we can't use those in the pages routeOverride, even though it's a constant in compile time | ||
const val HOME = "" | ||
// Unfortunately, we can't use those in the pages routeOverride, even though it's a constant in compile time | ||
const val PRIVACY_POLICY = "/privacy_policy" | ||
const val DOWNLOAD_MOBILE_APP = "/download_mobile_app" | ||
} |
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
5 changes: 2 additions & 3 deletions
5
...Main/kotlin/net/freshplatform/alrayada_landing_page/pages/ar/download_mobile_app/Index.kt
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,12 +1,11 @@ | ||
package net.freshplatform.alrayada_landing_page.pages.ar.download_mobile_app | ||
|
||
import androidx.compose.runtime.Composable | ||
import net.freshplatform.alrayada_landing_page.core.router.AppRouter | ||
import com.varabyte.kobweb.core.Page | ||
import com.varabyte.kobweb.core.rememberPageContext | ||
|
||
@Composable | ||
@Page | ||
fun DownloadMobileAppPage_Arabic() { | ||
rememberPageContext().router.navigateTo("${AppRouter.DOWNLOAD_MOBILE_APP}/?lang=ar") | ||
fun PrivacyPolicyPage_ar() { | ||
rememberPageContext().router.navigateTo("/download_mobile_app/?lang=ar") | ||
} |
5 changes: 2 additions & 3 deletions
5
...rc/jsMain/kotlin/net/freshplatform/alrayada_landing_page/pages/ar/privacy_policy/Index.kt
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,12 +1,11 @@ | ||
package net.freshplatform.alrayada_landing_page.pages.ar.privacy_policy | ||
|
||
import androidx.compose.runtime.Composable | ||
import net.freshplatform.alrayada_landing_page.core.router.AppRouter | ||
import com.varabyte.kobweb.core.Page | ||
import com.varabyte.kobweb.core.rememberPageContext | ||
|
||
@Composable | ||
@Page | ||
fun PrivacyPolicyPage_Arabic() { | ||
rememberPageContext().router.navigateTo("${AppRouter.PRIVACY_POLICY}/?lang=ar") | ||
fun PrivacyPolicyPage_ar() { | ||
rememberPageContext().router.navigateTo("/privacy_policy/?lang=ar") | ||
} |