zer0-image-generator 0.1.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7f4e6c4643293895075982356663b1f49b405838640ccb8455db1b93060ce5a
4
- data.tar.gz: 8708e0c991d7dd350c18ce958e3a4628393dc923c4594c42eded85b04d3839d9
3
+ metadata.gz: 457a89445d3f5c45786f984e760c4e06962a139e13031a6a6fa17aa085e8c11e
4
+ data.tar.gz: 988f30701ab41c3688b4118009cc606c4cd6f16917282482d95efb90b74993fb
5
5
  SHA512:
6
- metadata.gz: 1fffd493ddbf20127ef605568aa4ce7b04ad8861a6c4e579c257dd3c253df924f7cba9272a866c0885e49e662dec568e0d1bc9e92eb5c780bd6c9a686de76db6
7
- data.tar.gz: 77a9cc97328ac34db10e7285eac3aa6a535ae3fdcbd0b8e481063da402575335c9c260009b1f81fb0adbaeb50177e9d8dc750c1435987b77df7563f864352a6a
6
+ metadata.gz: 1f7d14a76291532c39d4b9d690ad30f97eb2910894ca1fa445028ef0e7adffacb0733366083b9c7802750e268a92ea69545b1c516e2afe62946011b6dba28bfe
7
+ data.tar.gz: 70b791ea4fef77a46eecc6a6cf7d3c26e058109294b49a6fcedec3f6f45aa46e9797ff378ad046f4e777a6c5c39a583ee58c1945b72c557d4bcc02211eabcf71
data/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ 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.0] - 2026-07-13
9
+
10
+ ### Added
11
+
12
+ - Honor Jekyll's top-level `source:` key: on sites like
13
+ [zer0-pages](https://github.com/bamr87/zer0-pages) (`source: pages`), the
14
+ engine now resolves collections, the output directory, `_data/authors.yml`,
15
+ and existence checks inside the source dir automatically — front-matter
16
+ values keep their site-URL form (`/images/previews/…`), so no path
17
+ configuration is needed.
18
+
8
19
  ## [0.1.0] - 2026-07-13
9
20
 
10
21
  ### 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
@@ -2359,6 +2370,7 @@ def main(argv: Optional[List[str]] = None) -> int:
2359
2370
 
2360
2371
  project_root = find_project_root()
2361
2372
  site_config = read_config(project_root)
2373
+ project_root = apply_source_root(project_root, site_config)
2362
2374
  settings = resolve_settings(args, site_config)
2363
2375
  VERBOSE = settings.verbose
2364
2376
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zer0ImageGenerator
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zer0-image-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel