ultimate-jekyll-manager 0.0.249 → 0.0.251

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/CLAUDE.md CHANGED
@@ -647,6 +647,85 @@ data-lazy="@type value"
647
647
 
648
648
  **Implementation:** `src/assets/js/core/lazy-loading.js`
649
649
 
650
+ ## Ad Units (Verts)
651
+
652
+ Ultimate Jekyll provides ad unit includes that display Google AdSense ads with automatic fallback to in-house ads served from promo-server when AdSense is blocked or unfilled.
653
+
654
+ ### Include Files
655
+
656
+ | Include | Purpose |
657
+ |---------|---------|
658
+ | `modules/adunits/adsense.html` | AdSense ad with promo-server fallback |
659
+ | `modules/adunits/promo-server.html` | Direct promo-server ad (no AdSense) |
660
+
661
+ ### AdSense Include
662
+
663
+ ```liquid
664
+ {% include /modules/adunits/adsense.html type="in-article" %}
665
+ {% include /modules/adunits/adsense.html type="in-article" vert-size="rectangle" %}
666
+ {% include /modules/adunits/adsense.html type="display" vert-size="banner" %}
667
+ {% include /modules/adunits/adsense.html type="display" vert-size="300" %}
668
+ ```
669
+
670
+ **Parameters:**
671
+
672
+ | Parameter | Required | Default | Description |
673
+ |-----------|----------|---------|-------------|
674
+ | `type` | No | `display` | Ad type: `display`, `in-article`, `in-feed`, `multiplex` |
675
+ | `slot` | No | From site config | Override the ad slot ID |
676
+ | `vert-size` | No | (unconstrained) | Max height preset or pixel value (cannot use `size` — conflicts with Liquid's built-in `size` filter) |
677
+ | `style` | No | `""` | Custom inline CSS |
678
+ | `layout` | No | `image-above` | Layout for `in-feed` type: `image-above`, `image-side` |
679
+
680
+ ### Promo Server Include
681
+
682
+ ```liquid
683
+ {% include /modules/adunits/promo-server.html vert-id="/verts/units/test/google" %}
684
+ {% include /modules/adunits/promo-server.html vert-id="/verts/units/test/google" vert-size="banner" %}
685
+ ```
686
+
687
+ **Parameters:**
688
+
689
+ | Parameter | Required | Default | Description |
690
+ |-----------|----------|---------|-------------|
691
+ | `vert-id` | Yes | `""` | Path to the vert on promo-server |
692
+ | `vert-size` | No | (unconstrained) | Max height preset or pixel value |
693
+ | `style` | No | `""` | Custom inline CSS |
694
+
695
+ ### Size Presets
696
+
697
+ The `vert-size` parameter accepts preset names or raw pixel values. Presets constrain the ad unit's max-height:
698
+
699
+ | Preset | Max Height | Typical Use |
700
+ |--------|-----------|-------------|
701
+ | `banner` | 90px | Horizontal banner ads |
702
+ | `leaderboard` | 90px | Wide horizontal ads (alias for banner) |
703
+ | `rectangle` | 250px | Medium rectangle, in-content ads |
704
+ | `large-rectangle` | 600px | Large rectangle, sidebar ads |
705
+ | `skyscraper` | 600px | Tall sidebar ads |
706
+
707
+ Raw pixel values are also accepted: `vert-size="300"` → 300px max-height.
708
+
709
+ When no `vert-size` is specified, the ad unit renders unconstrained.
710
+
711
+ ### How It Works
712
+
713
+ 1. The include renders a `data-lazy="@script ..."` div that lazy-loads `vert.bundle.js` when scrolled into view
714
+ 2. `vert.js` creates a `<vert-unit>` custom element with `max-height` + `overflow: hidden` (if `vert-size` is set)
715
+ 3. For AdSense types: loads the AdSense script, pushes the ad, and monitors fill status
716
+ 4. If AdSense is blocked or unfilled, falls back to a promo-server iframe
717
+ 5. The promo-server iframe content uses CSS container queries to adapt its layout to the available space
718
+ 6. Ad units are hidden for non-basic plan users via `data-wm-bind="@hide auth.account.subscription.product.id !== basic"`
719
+
720
+ ### File Locations
721
+
722
+ | Purpose | Path |
723
+ |---------|------|
724
+ | AdSense include | `src/defaults/dist/_includes/modules/adunits/adsense.html` |
725
+ | Promo Server include | `src/defaults/dist/_includes/modules/adunits/promo-server.html` |
726
+ | Vert JS module | `src/assets/js/modules/vert.js` |
727
+ | Vert CSS | `src/assets/css/core/_verts.scss` |
728
+
650
729
  ## Appearance Switching System
651
730
 
652
731
  Ultimate Jekyll supports dark/light/system theme switching with user preference persistence.
package/README.md CHANGED
@@ -314,6 +314,48 @@ Add the `.btn-action` class to protect custom elements that trigger important ac
314
314
  **Use `.btn-action` for:** API calls, form submissions, data modifications, payments, destructive actions
315
315
  **Don't use for:** Navigation, UI toggles, modals, accordions, harmless interactions
316
316
 
317
+ ### Ad Units (Verts)
318
+
319
+ UJ provides ad unit includes that display Google AdSense ads with automatic fallback to in-house promo-server ads when AdSense is blocked or unfilled.
320
+
321
+ #### AdSense Include (with fallback)
322
+ ```liquid
323
+ {% include /modules/adunits/adsense.html type="in-article" %}
324
+ {% include /modules/adunits/adsense.html type="display" vert-size="rectangle" %}
325
+ {% include /modules/adunits/adsense.html type="display" vert-size="300" %}
326
+ ```
327
+
328
+ | Parameter | Default | Description |
329
+ |-----------|---------|-------------|
330
+ | `type` | `display` | Ad type: `display`, `in-article`, `in-feed`, `multiplex` |
331
+ | `vert-size` | (unconstrained) | Max height preset or pixel value |
332
+ | `slot` | From site config | Override the ad slot ID |
333
+ | `style` | `""` | Custom inline CSS |
334
+
335
+ #### Promo Server Include (direct, no AdSense)
336
+ ```liquid
337
+ {% include /modules/adunits/promo-server.html vert-id="/verts/units/test/google" %}
338
+ {% include /modules/adunits/promo-server.html vert-id="/verts/units/test/google" vert-size="banner" %}
339
+ ```
340
+
341
+ | Parameter | Default | Description |
342
+ |-----------|---------|-------------|
343
+ | `vert-id` | `""` | Path to the vert on promo-server |
344
+ | `vert-size` | (unconstrained) | Max height preset or pixel value |
345
+ | `style` | `""` | Custom inline CSS |
346
+
347
+ #### Size Presets
348
+
349
+ | Preset | Max Height | Typical Use |
350
+ |--------|-----------|-------------|
351
+ | `banner` | 90px | Horizontal banner ads |
352
+ | `leaderboard` | 90px | Wide horizontal ads |
353
+ | `rectangle` | 250px | Medium rectangle, in-content ads |
354
+ | `large-rectangle` | 600px | Large rectangle, sidebar ads |
355
+ | `skyscraper` | 600px | Tall sidebar ads |
356
+
357
+ Raw pixel values also accepted: `vert-size="300"` → 300px max-height. Omit `vert-size` for unconstrained rendering.
358
+
317
359
  ### Special Query Parameters
318
360
 
319
361
  #### Authentication
@@ -213,7 +213,7 @@ const createCustomAd = ($vertUnit, config) => {
213
213
 
214
214
  // Size presets (name → max-height in pixels)
215
215
  const SIZE_PRESETS = {
216
- banner: 90,
216
+ banner: 150,
217
217
  leaderboard: 90,
218
218
  rectangle: 250,
219
219
  'large-rectangle': 600,
@@ -42,7 +42,7 @@
42
42
  {% assign full-width-responsive = "" %}
43
43
  {% endif %}
44
44
 
45
- {% assign vert-size = include.size | default: "" %}
45
+ {% assign vert-size = include.vert-size | default: "" %}
46
46
 
47
47
  <!-- Inject Ad -->
48
48
  {%- iftruthy page-adsense-client -%}
@@ -1,7 +1,7 @@
1
1
  <!-- Promo Server Ad Unit (Direct custom ads - no AdSense) -->
2
- <!-- Usage: include modules/adunits/promo-server.html size="banner" vert-id="/verts/units/test/google" -->
2
+ <!-- Usage: include modules/adunits/promo-server.html vert-size="banner" vert-id="/verts/units/test/google" -->
3
3
 
4
- {% assign vert-size = include.size | default: "" %}
4
+ {% assign vert-size = include.vert-size | default: "" %}
5
5
  {% assign vert-id = include.vert-id | default: "" %}
6
6
  {% assign vert-style = include.style | default: "" %}
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.249",
3
+ "version": "0.0.251",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {