Skip to content

Commit

Permalink
fix: fix typos in the SvelteKit guides (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
illright authored Oct 19, 2024
1 parent 39ae10f commit 9b25b25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Thus, the file structure will look like this:
│ │ │ │ ├── home-page.vue
│ │ │ ├── index.ts
```
Finally, let's add a root to the config:
Finally, let's add a route to the config:

```ts title="app/router.config.ts"
import type { RouterConfig } from '@nuxt/schema'
Expand Down Expand Up @@ -111,8 +111,8 @@ Now, you can create routes for pages within `app` and connect pages from `pages`

For example, to add a `Home` page to your project, you need to do the following steps:
- Add a page slice inside the `pages` layer
- Add the corresponding root inside the `app` layer
- Align the page from the slice with the root
- Add the corresponding route inside the `app` layer
- Connect the page from the slice with the route

To create a page slice, let's use the [CLI](https://github.com/feature-sliced/cli):

Expand All @@ -126,7 +126,7 @@ Create a ``home-page.vue`` file inside the ui segment, access it using the Publi
export { default as HomePage } from './ui/home-page';
```

Create a root for this page inside the `app` layer:
Create a route for this page inside the `app` layer:

```sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Thus, your file structure should look like this:
│ ├── app
│ │ ├── index.html
│ │ ├── routes
│ ├── pages # Папка pages, закреплённая за FSD
│ ├── pages # FSD Pages folder
```

Now, you can create roots for pages within `app` and connect pages from `pages` to them.
Now, you can create routes for pages within `app` and connect pages from `pages` to them.

For example, to add a home page to your project, you need to do the following steps:
- Add a page slice inside the `pages` layer
Expand All @@ -60,13 +60,13 @@ To create a page slice, let's use the [CLI](https://github.com/feature-sliced/cl
fsd pages home
```

Create a ``home-page.vue`` file inside the ui segment, access it using the Public API
Create a ``home-page.svelte`` file inside the ui segment, access it using the Public API

```ts title="src/pages/home/index.ts"
export { default as HomePage } from './ui/home-page';
export { default as HomePage } from './ui/home-page.svelte';
```

Create a root for this page inside the `app` layer:
Create a route for this page inside the `app` layer:

```sh

Expand All @@ -82,7 +82,7 @@ Create a root for this page inside the `app` layer:
│ │ │ ├── index.ts
```

Add your page component inside the `index.svelte` file:
Add your page component inside the `+page.svelte` file:

```html title="src/app/routes/+page.svelte"
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export default config;
fsd pages home
```

Создайте файл `home-page.vue` внутри сегмента ui, откройте к нему доступ с помощью Public API
Создайте файл `home-page.svelte` внутри сегмента ui, откройте к нему доступ с помощью Public API

```ts title="src/pages/home/index.ts"
export { default as HomePage } from './ui/home-page';
export { default as HomePage } from './ui/home-page.svelte';
```

Создайте роут для этой страницы внутри слоя `app`:
Expand All @@ -82,7 +82,7 @@ export { default as HomePage } from './ui/home-page';
│ │ │ ├── index.ts
```

Добавьте внутрь `index.svelte` файла компонент вашей страницы:
Добавьте внутрь `+page.svelte` файла компонент вашей страницы:

```html title="src/app/routes/+page.svelte"
<script>
Expand Down

0 comments on commit 9b25b25

Please sign in to comment.