More things
This commit is contained in:
@@ -29,8 +29,9 @@ npm run dev # → http://localhost:3000
|
||||
| Route | What it does |
|
||||
| --- | --- |
|
||||
| `/` | Search + recently updated articles |
|
||||
| `/wiki/<slug>` | Rendered article with table of contents |
|
||||
| `/wiki/<slug>/edit` | Markdown editor with live preview |
|
||||
| `/wiki/<lang>/<slug>` | One language version of an article, with its table of contents — every version has an address of its own, English included (`/wiki/en/…`) |
|
||||
| `/wiki/<slug>` | The short form, naming no language: it is turned onto the address of the version the slug speaks |
|
||||
| `/wiki/<lang>/<slug>/edit` — `/wiki/<slug>/edit` | Markdown editor with live preview |
|
||||
| `/new` | Create a new article |
|
||||
|
||||
## Markdown + LaTeX
|
||||
@@ -46,7 +47,8 @@ Handy macros: `\R`, `\N`, `\Z`, `\Q`, `\C` for the number sets.
|
||||
|
||||
| Method | Endpoint |
|
||||
| --- | --- |
|
||||
| GET | `/api/articles?q=&tag=` — search / filter, no content body |
|
||||
| GET | `/api/articles?q=&tag=&lang=&limit=&offset=` — search / filter, paged **by article** (`{ articles, total, hasMore }`; no `limit` means the whole shelf, and `?lang=` answers each article as the version written in it) |
|
||||
| GET | `/api/articles/facets` — `{ total, topics, languages }` counted over the whole shelf |
|
||||
| GET | `/api/articles/slug/:slug` — one article |
|
||||
| POST | `/api/articles` — create (`title` required; slug auto-generated & uniquified) |
|
||||
| PUT | `/api/articles/slug/:slug` — update |
|
||||
|
||||
Reference in New Issue
Block a user