Accept single snippet photos and derive post IDs from titles
This commit is contained in:
@@ -188,6 +188,8 @@ Create **Publish snippet**:
|
||||
- Header `Authorization`: `Bearer YOUR_TOKEN` (same token as photos).
|
||||
- `text`: **Text**, the combined shared text.
|
||||
- `caption`: **Text**, the optional note.
|
||||
- For a single image, `photo`: **File**, the shared image. No archive is needed.
|
||||
Use only one of `photo`, `photos`, or `archive` per request.
|
||||
- For images, **Make Archive** (ZIP) from **Snippet Images** first, and send its
|
||||
output as `archive`, type **File**. For text-only requests, omit this field.
|
||||
Use an **If** on whether there are images to choose between the form with
|
||||
@@ -204,6 +206,8 @@ branch and `archive` field; add the image branch when that works on your phone.
|
||||
`POST /api/snippets` accepts up to 20,000 characters of `text`, an optional
|
||||
4,000-character `caption`, and up to 20 images in a ZIP `archive` (or repeated `photos` parts), within
|
||||
the existing 100 MiB request limit. At least text or an image is required.
|
||||
The singular `photo` field accepts one image and produces the same submission
|
||||
as sending that image in `photos`.
|
||||
It returns `id`, `count` (image count), `url`, `status_url`, and `status`.
|
||||
`GET /api/snippets/<id>` checks publication, and
|
||||
`POST /api/snippets/<id>/retry` retries failed Git publication. Identical text,
|
||||
@@ -237,6 +241,13 @@ filename is used if there is no heading. Optional YAML front matter supports
|
||||
preserved; Liquid template evaluation is disabled for imported post bodies.
|
||||
The original file is retained privately in the service volume.
|
||||
|
||||
New posts derive `post_id` from the title: `My New Post!` becomes `my-new-post`.
|
||||
Spaces, underscores, and punctuation become single dashes; Unicode letters are
|
||||
preserved. The default URL is `/my-new-post/`. Explicit `post_id` values still
|
||||
override this default. Updates keep the existing ID and URL even if the title
|
||||
changes. If unrelated content has the same title-derived ID, publication fails
|
||||
instead of overwriting it; choose another title or an explicit ID.
|
||||
|
||||
### Automatic updates by content
|
||||
|
||||
The publisher compares the body against existing Markdown posts, ignoring front
|
||||
|
||||
Reference in New Issue
Block a user