@stacksjs/defaults 0.75.6 → 0.75.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -190,6 +190,24 @@ email. Moderate without a dashboard with `buddy comments:list [--status] [--type
190
190
  | GET | `/blog/feed.xml` | RSS 2.0 feed (20 recent) |
191
191
  | GET | `/blog/sitemap.xml` | XML sitemap for SEO |
192
192
 
193
+ ## Post Bodies: Images, Grids, Zoom and Embeds
194
+
195
+ Blog post HTML goes through `renderPostHtml` from `@stacksjs/cms/article`, built on ts-medium-editor's article renderer. The BunPress blog (`core/actions/src/blog.ts`) does this already; an stx-native blog calls it from its post view:
196
+
197
+ ```ts
198
+ const { renderPostHtml, articleHead, articleScript } = require('@stacksjs/cms/article')
199
+ post.html = renderPostHtml(markdownHtml) // then {!! articleHead() !!} in @push('head'), {!! articleScript() !!} in @push('scripts')
200
+ ```
201
+
202
+ What authors get from plain markdown:
203
+
204
+ - `![alt](/images/a.jpg "Caption")` alone in a paragraph becomes a figure with a caption.
205
+ - Images in consecutive paragraphs become a grid: two side by side, three with the tallest on the left and two stacked on the right, four as 2x2, more in rows of three and two. Sizes are read from the files in `public/`, so columns are proportioned and nothing crops or shifts.
206
+ - Lazy loading after the first image, click-to-zoom on every unlinked image.
207
+ - A bare YouTube, Vimeo or `https://hq.training/a/<id>` link on its own line becomes an embed.
208
+
209
+ Tune the look with custom properties (`--me-radius`, `--me-gap`, `--me-block-space`, `--me-caption-color`, `--me-zoom-backdrop`) on the post body. `imageSize(bytes)` and `publicImageResolver(dir)` are exported for other uses.
210
+
193
211
  ## Blog Configuration (config/blog.ts)
194
212
 
195
213
  ```typescript
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.6",
5
+ "version": "0.75.8",
6
6
  "description": "A modern Stacks development environment.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.6",
5
+ "version": "0.75.8",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@iconify-json/f7": "^1.2.2",
57
57
  "@iconify-json/hugeicons": "^1.2.27",
58
- "@stacksjs/mobile": "^0.75.6",
58
+ "@stacksjs/mobile": "^0.75.8",
59
59
  "@stacksjs/sanitizer": "^0.2.113",
60
60
  "ts-qr-codes": "^0.1.8"
61
61
  }