photosuite 0.2.1-beta → 0.4.0
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.
- package/README.md +47 -4
- package/README.zh-CN.md +363 -313
- package/demo/pnpm-lock.yaml +3713 -3713
- package/demo/src/pages/index.astro +1 -1
- package/dist/photosuite.integration.cjs +2 -2
- package/dist/photosuite.integration.js +269 -125
- package/dist/rehype/exiftoolVendored.d.ts +5 -0
- package/dist/types.d.ts +40 -0
- package/package.json +76 -76
package/README.md
CHANGED
|
@@ -130,6 +130,39 @@ photosuite({
|
|
|
130
130
|
})
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
+
**Per-Page Filtering:**
|
|
134
|
+
|
|
135
|
+
`scope` is a CSS selector that only governs *client-side* behavior (lightbox, captions, grid). The EXIF rehype plugin runs at build time on **every** Markdown file's `<img>` tags and rewrites their DOM into `.photosuite-item` + `.photosuite-exif`. If you have non-article pages (e.g. `about.md`) outside the `scope` container, you'll still see the injected EXIF markup in the HTML.
|
|
136
|
+
|
|
137
|
+
To restrict EXIF injection to specific pages, use either of:
|
|
138
|
+
|
|
139
|
+
**Option 1 Glob patterns in config**:
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
photosuite({
|
|
143
|
+
scope: '#article',
|
|
144
|
+
exif: {
|
|
145
|
+
// Only process matched files; omit to process all
|
|
146
|
+
include: ['src/content/posts/**/*.md'],
|
|
147
|
+
// Skip matched files; takes precedence over include
|
|
148
|
+
exclude: ['src/content/pages/**/*.md'],
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Patterns are matched against paths relative to the project root, normalized with `/` separators. Supported wildcards: `*` (within a segment), `**` (across segments), `?` (single character).
|
|
154
|
+
|
|
155
|
+
**Option 2 Frontmatter opt-out**:
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
---
|
|
159
|
+
title: About
|
|
160
|
+
exif: false # or: photosuite: false
|
|
161
|
+
---
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Pages with `exif: false`, `photosuite: false`, or `photosuite.exif: false` in frontmatter are skipped regardless of `include`/`exclude`.
|
|
165
|
+
|
|
133
166
|
### 3. Image Grid
|
|
134
167
|
|
|
135
168
|
Photosuite supports automatically combining consecutive images into a grid layout. When 2-3 images are placed adjacently in Markdown, they will be automatically combined into a grid, and each image remains independently clickable.
|
|
@@ -254,7 +287,10 @@ photosuite({
|
|
|
254
287
|
'ISO', // ISO
|
|
255
288
|
'DateTimeOriginal' // Date Original
|
|
256
289
|
],
|
|
257
|
-
separator: ' · '
|
|
290
|
+
separator: ' · ', // Separator
|
|
291
|
+
// Per-page filtering (since v0.3.1)
|
|
292
|
+
include: undefined, // string[] of glob patterns; omit to process all pages
|
|
293
|
+
exclude: undefined, // string[] of glob patterns; takes precedence over include
|
|
258
294
|
},
|
|
259
295
|
|
|
260
296
|
// Fancybox native options
|
|
@@ -282,6 +318,9 @@ photosuite({
|
|
|
282
318
|
|
|
283
319
|
## FAQ
|
|
284
320
|
|
|
321
|
+
**Q: My non-article pages (e.g. about page) still show EXIF info even though they're outside the `scope` container.**
|
|
322
|
+
A: `scope` only controls *client-side* behavior. The EXIF rehype plugin runs at build time on every Markdown file. Restrict it via `exif.include` / `exif.exclude` glob patterns, or add `exif: false` to a page's frontmatter. See [EXIF Data Display § Per-Page Filtering](#2-exif-data-display).
|
|
323
|
+
|
|
285
324
|
**Q: Why isn't EXIF data showing?**
|
|
286
325
|
A: Please check the following:
|
|
287
326
|
1. Does the image contain EXIF data? (Some compression tools strip EXIF)
|
|
@@ -305,9 +344,13 @@ But we insist on taking root in this soil, letting thought be free, and letting
|
|
|
305
344
|
|
|
306
345
|
[](https://github.com/achuanya/photosuite/graphs/contributors)
|
|
307
346
|
|
|
308
|
-
##
|
|
309
|
-
|
|
347
|
+
## Users
|
|
348
|
+
|
|
349
|
+
- [Frevia](https://www.frevia.site)
|
|
350
|
+
- [ZhiJun's Blog](https://blog.zhijun.io)
|
|
351
|
+
|
|
352
|
+
If you are using using Photosuite, please edit this file to add your blog.
|
|
310
353
|
|
|
311
354
|
## License
|
|
312
355
|
|
|
313
|
-
[GPL-3.0](./LICENSE)
|
|
356
|
+
[GPL-3.0](./LICENSE)
|