# Markdown to SPIP > Convertisseur en ligne Markdown vers syntaxe SPIP, en temps réel. Gratuit, open source (AGPL-3.0), sans inscription, sans tracking. Une API HTTP en texte brut permet aux scripts et aux agents d'obtenir la même conversion. ## Purpose This web application converts Markdown to SPIP syntax. SPIP (Système de Publication pour Internet Partagé) is a French open source CMS with its own markup, distinct from Markdown. Writers draft in Markdown and paste the SPIP result into the CMS. The conversion is deterministic: prefer the API below over converting by hand, the edge cases (nested lists, footnotes, combined emphasis, tables) are covered by tests. ## API `POST https://markdown2spip.orsal.fr/api/convert` - Request body: the raw Markdown text, UTF-8. Any content type is accepted; the body is read as is. - Response: `200`, the SPIP text as `text/plain; charset=UTF-8`. - No authentication, no session, no CSRF token. - Limits: 100,000 characters per request, 60 requests per minute per IP. - Errors, as plain text: `400` invalid UTF-8, `413` text too long, `429` rate limit (with `Retry-After`), `405` any method other than POST. - The text is converted in memory and never stored. Each non-empty request increments an anonymous daily counter shown on `/stats`. - OpenAPI 3.1 description: https://markdown2spip.orsal.fr/openapi.json - Human documentation: https://markdown2spip.orsal.fr/guide#api ```bash curl --data-binary @article.md https://markdown2spip.orsal.fr/api/convert ``` Use `--data-binary`, not `-d`: `-d` strips the line breaks, which carry the Markdown structure. ## Supported conversions | Markdown | SPIP | |---|---| | `# Title` | `{{{Title}}}` (h1 only) | | `## Title` to `###### Title` | `{{Title}}` | | `**bold**` or `__bold__` | `{{bold}}` | | `*italic*` or `_italic_` | `{italic}` | | `***both***` or `___both___` | `{{ { both } }}` | | `~~strike~~` | `strike` | | `` `code` `` | `code` | | fenced code block, with or without language | `…` (language dropped, content left untouched) | | `[text](url "title")` | `[text->url]` (title dropped) | | `` | `[->https://url]` | | `![alt](url)` | `[alt->url]` (SPIP images are attached documents) | | `- item`, `* item`, `+ item` | `-* item` | | `1. item` or `1) item` | `-# item` | | indented items | `-** item`, `-## item`… (depth from indentation) | | `---`, `***` or `___` | `----` | | `\| a \| b \|` + `\|---\|---\|` | `\| {{a}} \| {{b}} \|` (header in bold, separator removed) | | `> quote` | `quote` | | `text[^1]` + `[^1]: note` | `text[[note]]` | Rules: - `_` inside a word is not emphasis: `snake_case` stays as is. - Emphasis never spans several lines; an isolated `*` (as in `2 * 3`) is kept. - A footnote reference without a definition is kept as is. ## Pages - `/` and `/en` — converter (French and English) - `/guide` and `/en/guide` — worked example, syntax reference, limits, privacy, FAQ, API - `/openapi.json` — OpenAPI description of the API - `/stats` and `/en/stats` — public usage counters (noindex) - `/mentions-legales` and `/en/legal` — legal notice (noindex) - `/sitemap.xml`, `/robots.txt` ## Web interface - Real-time conversion while typing, split view (Markdown left, SPIP right) - One-click copy - Draft kept in the browser localStorage, erased 7 days after the last edit - Light, dark or system theme - Same limits as the API: 100,000 characters per conversion ## Privacy - Text is sent to the server for conversion, never stored nor logged. - No tracking, no analytics, no advertising cookies. Only the Laravel session cookie on the web pages (CSRF); the API sets no cookie. - The server stores anonymous counters per day: visits, conversions, copies, copied characters, API conversions. They are public on `/stats`. - IP addresses are only short-lived rate-limiting keys in the cache. ## Technical stack - Laravel 13, PHP 8.5, Livewire 4, Alpine.js, Tailwind CSS 4, Vite 8 - Conversion engine: `App\Support\MarkdownToSpipConverter`, pure and stateless - Tests: PHPUnit 13 (115 tests); static analysis: Larastan level 10; code style: Laravel Pint ## Local installation ```bash git clone https://github.com/Gallyan/md2spip.git cd md2spip composer run setup php artisan serve ``` ## License GNU AGPL-3.0: modified versions offered as a network service must publish their source. ## Source - Repository: https://github.com/Gallyan/md2spip - Author: Guillaume Orsal — https://www.orsal.fr