Skip to content

Commit

Permalink
Add netlify deploy for locale-router
Browse files Browse the repository at this point in the history
  • Loading branch information
jarda-svoboda committed Jul 10, 2023
1 parent fe72f78 commit b37f6dc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ These examples demonstrate how to integrate `sveltekit-i18n` into your app. Curr
- this approach is great if you care about SEO
- optimized for `@sveltejs/adapter-static`

[`locale-router`](./locale-router)
[`locale-router`](./locale-router)[Demo](https://locale-router.netlify.app)
- this `multi-page` app demonstrates locale-based routing (e.g. `https://example.com/en/about`)
- this approach is great if you care about SEO
- optimized for non-static adapters (e.g. `@sveltejs/adapter-node`)
Expand Down
1 change: 0 additions & 1 deletion examples/locale-router/.npmrc

This file was deleted.

7 changes: 6 additions & 1 deletion examples/locale-router/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/474b5633-14d8-4e1b-846f-f122f2ad4c25/deploy-status)](https://locale-router.netlify.app)

# Locale-router
This app shows how to integrate locale routing using dynamic adapters (e.g. `@sveltejs/adapter-node`). It includes two pages and three language mutations (`en`, `de`, `cs`). Error pages are included as well.

## Setup
## Preview
You can view this demo live on [Netlify](https://locale-router.netlify.app).

## Naticeable files

### `./src/hooks.server.js`
Takes care about redirects to appropriate language mutation.
5 changes: 5 additions & 0 deletions examples/locale-router/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
command = "cd ../../ && npm run build && npm run build --workspace locale-router"
publish = "build"
[functions]
node_bundler = "esbuild"

0 comments on commit b37f6dc

Please sign in to comment.