zer0-image-generator 0.1.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +5 -0
- data/lib/zer0_image_generator/preview_generator.py +16 -0
- data/lib/zer0_image_generator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 36da81ce0baf2b37bb861a7fe2f03d62c37c667d8a0754a9cc1ee95ee6afc827
|
|
4
|
+
data.tar.gz: a18923ae9adf0a2b38e2dca873bfaaba9e1e1437249e68ca5b70cc7dc59c6588
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63b595b05dddeaf526df975f62ad5d8644b4d9e8571398a717b2207a5927a1c5f1216db0ec71aab7c00f2f7077d14e9a430b57ea1650ee882c35d7c2579c3382
|
|
7
|
+
data.tar.gz: dfe915ca69f2bb13a3023c63641755e96498634eb07d4779721158361e871a7433b701fa775f8ecfba358a9c4a73a2c5698c46dcacc8231968b15f1d5857df7b
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.1] - 2026-07-13
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `--file` on `source:` sites now accepts repo-root-relative paths
|
|
13
|
+
(`pages/_notes/x.md`) as well as source-relative ones (`_notes/x.md`).
|
|
14
|
+
|
|
15
|
+
## [0.2.0] - 2026-07-13
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Honor Jekyll's top-level `source:` key: on sites like
|
|
20
|
+
[zer0-pages](https://github.com/bamr87/zer0-pages) (`source: pages`), the
|
|
21
|
+
engine now resolves collections, the output directory, `_data/authors.yml`,
|
|
22
|
+
and existence checks inside the source dir automatically — front-matter
|
|
23
|
+
values keep their site-URL form (`/images/previews/…`), so no path
|
|
24
|
+
configuration is needed.
|
|
25
|
+
|
|
8
26
|
## [0.1.0] - 2026-07-13
|
|
9
27
|
|
|
10
28
|
### Added
|
data/README.md
CHANGED
|
@@ -100,6 +100,11 @@ preview_images:
|
|
|
100
100
|
Priority per file: author overrides → CLI flags → environment variables →
|
|
101
101
|
`_config.yml` → built-in defaults.
|
|
102
102
|
|
|
103
|
+
Jekyll's own top-level `source:` key is honored automatically: on a site with
|
|
104
|
+
`source: pages` (content, assets, and `_data` under `pages/`), every disk path
|
|
105
|
+
above resolves inside `pages/` while front-matter values keep their site-URL
|
|
106
|
+
form. No extra configuration needed.
|
|
107
|
+
|
|
103
108
|
### Recipe: standard Jekyll site with jekyll-seo-tag
|
|
104
109
|
|
|
105
110
|
```yaml
|
|
@@ -547,6 +547,17 @@ def load_yaml_file(path: Path) -> Dict[str, Any]:
|
|
|
547
547
|
return {}
|
|
548
548
|
|
|
549
549
|
|
|
550
|
+
def apply_source_root(project_root: Path, config: Dict[str, Any]) -> Path:
|
|
551
|
+
"""Honor Jekyll's top-level `source:` key: content (collections, assets,
|
|
552
|
+
_data) lives under <root>/<source> while _config.yml stays at the root —
|
|
553
|
+
e.g. zer0-pages sets `source: pages`. Disk-side only: URL-space values
|
|
554
|
+
(front-matter paths, assets_prefix) are unaffected."""
|
|
555
|
+
source = str(config.get("source") or "").strip().strip("/")
|
|
556
|
+
if source and source != ".":
|
|
557
|
+
return project_root / source
|
|
558
|
+
return project_root
|
|
559
|
+
|
|
560
|
+
|
|
550
561
|
def read_config(project_root: Path) -> Dict[str, Any]:
|
|
551
562
|
"""The site's full _config.yml — resolve_settings extracts the
|
|
552
563
|
`preview_images:` block plus the top-level Jekyll keys it honors
|
|
@@ -2206,7 +2217,11 @@ class Runner:
|
|
|
2206
2217
|
if settings.file:
|
|
2207
2218
|
target = Path(settings.file)
|
|
2208
2219
|
if not target.is_absolute():
|
|
2220
|
+
# Source-relative first; then cwd-relative, so repo-root paths
|
|
2221
|
+
# like pages/_notes/x.md still work on `source:` sites.
|
|
2209
2222
|
target = self.root / settings.file
|
|
2223
|
+
if not target.is_file() and (Path.cwd() / settings.file).is_file():
|
|
2224
|
+
target = Path.cwd() / settings.file
|
|
2210
2225
|
if not target.is_file():
|
|
2211
2226
|
error_exit(f"File not found: {settings.file}")
|
|
2212
2227
|
self.process_file(target)
|
|
@@ -2359,6 +2374,7 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
2359
2374
|
|
|
2360
2375
|
project_root = find_project_root()
|
|
2361
2376
|
site_config = read_config(project_root)
|
|
2377
|
+
project_root = apply_source_root(project_root, site_config)
|
|
2362
2378
|
settings = resolve_settings(args, site_config)
|
|
2363
2379
|
VERBOSE = settings.verbose
|
|
2364
2380
|
|