Skip to content

Commit b9ebf1b

Browse files
committed
docs(quoteforge[image-block]): document the image block in schema docs and README
1 parent 4be7fba commit b9ebf1b

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ Create your own: `quoteforge themes create my-brand`
288288
| `callout` | Rounded box highlight | `items[]{label, text}` |
289289
| `divider` | Full-width horizontal rule ||
290290
| `spacer` | Vertical whitespace | `size: sm\|md\|lg` |
291+
| `image` | Inline image (URL, local path, or data-URI) | `src`, `alt?`, `width: sm\|md\|lg\|full`, `align: left\|center\|right` |
291292

292293
### Inline Part Styles
293294

site/src/docs/content-schema.mdx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Each slide inherits from `defaults`; any field on the slide overrides it. Slides
5353

5454
## Block types
5555

56-
Seven block types live in `BlockSchema`:
56+
Eight block types live in `BlockSchema`:
5757

5858
### `headline` — display text
5959
```json
@@ -118,6 +118,30 @@ Seven block types live in `BlockSchema`:
118118

119119
`size` is `"sm" | "md" | "lg"`.
120120

121+
### `image` — inline image
122+
```json
123+
{
124+
"id": "img",
125+
"type": "image",
126+
"src": "./logo.svg",
127+
"alt": "Company logo",
128+
"width": "md",
129+
"align": "center"
130+
}
131+
```
132+
133+
- `src` — a remote URL (`https://…`), a local file path, or a `data:` URI. Local
134+
paths are resolved relative to the content file's directory and inlined at render
135+
time (`png`/`jpg`/`jpeg`/`webp`/`gif`/`svg`). For security, the Studio server only
136+
accepts `http(s):`/`data:` sources — local file paths work via the CLI only.
137+
- `alt` — optional alternative text.
138+
- `width``"sm" | "md" | "lg" | "full"` (33% / 50% / 75% / 100% of the content
139+
column). Defaults to `"full"`.
140+
- `align``"left" | "center" | "right"`. Defaults to `"center"`.
141+
142+
In the Studio, add an Image block and either paste a URL or upload a file (the upload
143+
is embedded as a `data:` URI, so the card stays self-contained).
144+
121145
## Part styles
122146

123147
`headline` and `blockquote` blocks hold an array of **parts**, each styled independently:

site/src/docs/templates.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ All templates **inherit a shared base CSS** (`templates/_base.css`) that handles
3030
- Flex-based top-to-bottom block distribution
3131
- Dimension-aware font scaling
3232
- Puppeteer-ready font loading gates
33-
- Callout, divider, spacer, and quote rendering
33+
- Callout, divider, spacer, quote, and image rendering (image width + alignment)
3434

3535
Template CSS only adds personality on top — letter-spacing, border weights, radius tweaks.
3636

0 commit comments

Comments
 (0)