work
This commit is contained in:
@@ -1,52 +1,38 @@
|
||||
# RustPad 0.6.0
|
||||
|
||||
Współdzielony edytor Markdown z dwoma niezależnymi trybami:
|
||||
Collaborative Markdown editor with standalone notes and workspaces.
|
||||
|
||||
- szybka notatka pod `/p/<slug>`,
|
||||
- workspace z wieloma notatkami pod `/w/<slug>`.
|
||||
|
||||
Oba tryby obsługują opcjonalne hasła, edycję na żywo, SQLite, historię zmian, podgląd Markdown i stan widoku zapisany w URL.
|
||||
|
||||
## Uruchomienie lokalne
|
||||
## Development setup
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
cargo run
|
||||
./dev.sh
|
||||
```
|
||||
|
||||
Otwórz `http://127.0.0.1:3000`.
|
||||
The script creates `data/db` and `data/files`, builds the project, and runs it with Cargo. When Cargo is unavailable, it uses `docker compose up --build`.
|
||||
|
||||
## Docker
|
||||
## Funkcje notatek workspace
|
||||
|
||||
```bash
|
||||
cp .env.docker.example .env
|
||||
docker compose up --build
|
||||
```
|
||||
- real-time collaborative editing over WebSocket,
|
||||
- nickname remembered in `localStorage`,
|
||||
- change authors in history,
|
||||
- line numbering enabled by default with a persistent toggle,
|
||||
- owner color next to each line,
|
||||
- upload images and files to `data/files/pads/<id>_<token>/` lub `data/files/notes/<id>_<token>/`,
|
||||
- automatic Markdown link insertion after upload,
|
||||
- Markdown i diagramy Mermaid,
|
||||
- history with snippets, previews, and version restore.
|
||||
|
||||
Baza znajduje się w wolumenie `rustpad_data`.
|
||||
## Dane
|
||||
|
||||
## Adresy
|
||||
- SQLite: `data/db/rustpad.db`,
|
||||
- files: `data/files/pads/<id>_<token>/` i `data/files/notes/<id>_<token>/`; the public URL has the form `/f/<token>/<nazwa>`.
|
||||
|
||||
```text
|
||||
/p/notatka?view=split&mode=markdown
|
||||
/w/workspace
|
||||
/w/workspace/n/notatka?view=split&mode=markdown
|
||||
```
|
||||
In Docker, both directories are located under `/data`.
|
||||
|
||||
## Frontend
|
||||
## Publishing a note as a page
|
||||
|
||||
- `home.js` — tworzenie szybkiej notatki i workspace,
|
||||
- `pad.js` — samodzielna notatka,
|
||||
- `workspace.js` — lista i tworzenie notatek w workspace,
|
||||
- `note.js` — notatka należąca do workspace,
|
||||
- `url-state.js` — stan widoku w URL,
|
||||
- `clipboard.js` — kopiowanie pełnego adresu,
|
||||
- `socket.js` — połączenia WebSocket,
|
||||
- `markdown.js` — renderowanie Markdown,
|
||||
- `editor-format.js` — formatowanie tekstu,
|
||||
- `api.js` — komunikacja HTTP,
|
||||
- `session.js` — hasła workspace w `sessionStorage`.
|
||||
Use the **Page** button in the editor. RustPad creates a permanent public `/s/<token>` address, copies it to the clipboard, and opens it in a new tab. The page displays the current note content and renders Markdown, images, links, and Mermaid. Publishing a protected note requires the password, but the published link itself is public.
|
||||
|
||||
## Dane istniejące
|
||||
## Limit uploadu
|
||||
|
||||
Tabele `pads` i `revisions` pozostają aktywne. Workspace są dodatkiem, nie zamiennikiem zwykłych notatek. Przed aktualizacją wykonaj kopię `rustpad.db`.
|
||||
The maximum size of a single file is configured with `UPLOAD_MAX_SIZE_MB` w `.env`, np. `UPLOAD_MAX_SIZE_MB=50`. The default is 20 MB. After changing it, restart the project with `./dev.sh`.
|
||||
|
||||
Reference in New Issue
Block a user