You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-ru.md
+98-10Lines changed: 98 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -14,24 +14,112 @@
14
14
npm install @gravity-ui/page-constructor
15
15
```
16
16
17
-
## Необходимые зависимости
17
+
## Быстрый старт
18
18
19
-
Для начала работы с пакетом в проекте необходимо предварительно установить следующие зависимости: `@diplodoc/transform`, `@gravity-ui/uikit`, `react`. Подробную информацию можно найти в разделе `peerDependencies` файла `package.json`.
19
+
Для начала нам понадобится проект на react и какой-нибудь сервер. Например, можно сделать react проект с использованием Vite и сервер на express или можно создать Next.js приложение - в нем сразу будет клиентская и серверная часть.
20
20
21
-
### Начало работы
21
+
Устанавливаем необходимые зависимости:
22
22
23
-
Конструктор страниц импортируется в виде React-компонента. Для корректной работы его необходимо обернуть в `PageConstructorProvider`:
Чтобы начачать новый проект с нуля можно использовать [готовый шаблон на Next.js](https://github.com/gravity-ui/page-constructor-website-template) который мы подготовили.
Copy file name to clipboardExpand all lines: README.md
+98-10Lines changed: 98 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -14,24 +14,112 @@ For the format of input data and list of available blocks, see the [documentatio
14
14
npm install @gravity-ui/page-constructor
15
15
```
16
16
17
-
## Required dependencies
17
+
## Quick start
18
18
19
-
Please note that to start using the package, your project must also have the following installed: `@diplodoc/transform`, `@gravity-ui/uikit`, `react`. Check out the `peerDependencies` section of `package.json` for accurate information.
19
+
First, we need a React project and some kind of server. For example, you can create a React project using Vite and an Express server, or you can create Next.js application - it will have a client and server side at once.
20
20
21
-
### Getting started
21
+
Install the required dependencies:
22
22
23
-
The page constructor is imported as a React component. To make sure it runs properly, wrap it in `PageConstructorProvider`:
This was the simplest example of a connection. In order for YFM markup to work, you need to process content on the server and receive it on the client.
57
+
58
+
If your server is a separate application, then you need to install page-constructor:
59
+
60
+
```shell
61
+
npm install @gravity-ui/page-constructor
62
+
```
63
+
64
+
To process YFM in all base blocks, call the `contentTransformer` and pass the content and options there:
To start a new project, you can use the [ready-made template on Next.js ](https://github.com/gravity-ui/page-constructor-website-template) which we have prepared.
0 commit comments