mirror of
https://github.com/elyby/docs.git
synced 2026-11-29 19:03:23 +05:30
Describe how to work with the project in the README
This commit is contained in:
1 file changed
+23
-29
@@ -1,41 +1,35 @@
|
||||
# Website
|
||||
# Ely.by Docs
|
||||
|
||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
||||
Source of [docs.ely.by](https://docs.ely.by), built with [Docusaurus](https://docusaurus.io).
|
||||
|
||||
### Installation
|
||||
## Development
|
||||
|
||||
```
|
||||
$ yarn
|
||||
Requires Node.js 22.
|
||||
|
||||
```sh
|
||||
npm ci
|
||||
npm run start
|
||||
```
|
||||
|
||||
### Local Development
|
||||
The dev server shows the Russian version. To check another language, download the translations from Crowdin
|
||||
(requires the `CROWDIN_PERSONAL_TOKEN` environment variable) and start the server for that locale:
|
||||
|
||||
```
|
||||
$ yarn start
|
||||
```sh
|
||||
npm run write-translations -- --locale ru --override
|
||||
npx @crowdin/cli@4 download
|
||||
npm run start -- --locale en
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
`npm run build` builds the whole site into `build/`, `npm run serve` serves it.
|
||||
|
||||
### Build
|
||||
## Writing
|
||||
|
||||
```
|
||||
$ yarn build
|
||||
```
|
||||
- Pages are written in Russian in `docs/` (MDX). Don't wrap lines: one paragraph is one line.
|
||||
- Translations are made only on [Crowdin](https://ely.crowdin.com). The `i18n/` directory is generated and not committed.
|
||||
- Keep the `{#id}` of headings: they are the anchors of the existing links.
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
## Deployment
|
||||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
Every push to `master` uploads the source strings to Crowdin, downloads the translations and deploys the site
|
||||
to the `gh-pages` branch. A language is published once its translation reaches 60%. The site is also rebuilt
|
||||
nightly to publish fresh translations.
|
||||
Reference in new issue
Block a user