Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix typos in the SvelteKit guides #737

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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