ultimate-jekyll-manager 0.0.180 → 0.0.182

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.
@@ -27,6 +27,8 @@ webManager.dom().ready().then(() => {
27
27
  type: $currentScript.getAttribute('data-ad-type') || 'display',
28
28
  layout: $currentScript.getAttribute('data-ad-layout'),
29
29
  style: $currentScript.getAttribute('data-ad-style') || '',
30
+ size: $currentScript.getAttribute('data-ad-size') || '',
31
+ vertId: $currentScript.getAttribute('data-ad-vert-id') || '',
30
32
  };
31
33
 
32
34
  // Log the configuration for debugging
@@ -149,14 +151,21 @@ const createCustomAd = ($vertUnit, config) => {
149
151
  const iframeId = `vert-${window.__ujVertIdCounter = (window.__ujVertIdCounter || 0) + 1}`;
150
152
 
151
153
  // Build base URL for the ad content
152
- const baseURL = qsDebug
153
- ? 'http://localhost:4001/verts/main'
154
+ // Use local server if debug=true OR if we're in development mode
155
+ const baseURL = (qsDebug || webManager.isDevelopment())
156
+ ? `${window.location.protocol}//${window.location.host}/verts/main`
154
157
  : 'https://promo-server.itwcreativeworks.com/verts/main';
155
158
 
156
159
  // Build full URL with parameters
157
160
  const adURL = new URL(baseURL);
158
161
  adURL.searchParams.set('parentURL', window.location.href);
159
162
  adURL.searchParams.set('frameId', iframeId);
163
+ if (config.size) {
164
+ adURL.searchParams.set('size', config.size);
165
+ }
166
+ if (config.vertId) {
167
+ adURL.searchParams.set('loadVertId', config.vertId);
168
+ }
160
169
 
161
170
  // Set iframe attributes
162
171
  $iframe.id = iframeId;
@@ -0,0 +1,18 @@
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" -->
3
+
4
+ {% assign vert-size = include.size | default: "" %}
5
+ {% assign vert-id = include.vert-id | default: "" %}
6
+ {% assign vert-style = include.style | default: "" %}
7
+
8
+ <div data-lazy='@script {
9
+ "src": "{{ site.url }}/assets/js/modules/vert.bundle.js?cb={{ site.uj.cache_breaker }}",
10
+ "attributes": {
11
+ "data-ad-type": "custom",
12
+ "data-ad-size": "{{ vert-size }}",
13
+ "data-ad-vert-id": "{{ vert-id }}",
14
+ "data-ad-style": "{{ vert-style }}",
15
+ "async": ""
16
+ }
17
+ }'>
18
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.180",
3
+ "version": "0.0.182",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {