ultimate-jekyll-manager 1.9.8 → 1.9.9
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 +1 -0
- package/dist/defaults/dist/_includes/themes/classy/backend/sections/sidebar.html +2 -2
- package/dist/defaults/dist/_includes/themes/classy/frontend/sections/nav.html +2 -2
- package/dist/defaults/dist/_layouts/themes/classy/frontend/pages/feedback.html +1 -1
- package/docs/common-mistakes.md +1 -0
- package/docs/jekyll-plugin.md +3 -1
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -193,6 +193,7 @@ All `npm install` calls in CLI commands (`npx mgr i`, `npx mgr setup`) route thr
|
|
|
193
193
|
- **No backwards compatibility** unless explicitly requested.
|
|
194
194
|
- **Don't add `?.` paranoia.** Framework internals (`manager.config`, `manager.webManager`) deref directly. `?.` belongs only on user-supplied config sub-fields, optional return values from regex matches, caught exceptions, and pre-init state.
|
|
195
195
|
- **Use `process.cwd()` (not hardcoded paths) for consumer-project resolution** in gulp tasks + commands. UJM runs inside the consumer's working directory.
|
|
196
|
+
- **All `<img src>` tags MUST have a cachebreaker** — append `?cb={{ site.uj.cache_breaker }}` to image `src` attributes in includes and layouts. This applies to logos, brandmarks, rating images, and any other image rendered via Liquid variables. External third-party URLs (YouTube embeds, analytics pixels, placeholder services) are exempt. `data-lazy="@src"` is handled at the JS layer, not here. See [docs/common-mistakes.md](docs/common-mistakes.md).
|
|
196
197
|
|
|
197
198
|
## Doc-update parity
|
|
198
199
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="{{ logo_href }}" class="d-flex align-items-center text-decoration-none text-body">
|
|
11
11
|
{% iftruthy logo_src %}
|
|
12
12
|
<div class="avatar avatar-md me-2 {{ logo_class }}">
|
|
13
|
-
<img src="{{ logo_src }}" alt="{{ logo_text }} Logo"/>
|
|
13
|
+
<img src="{{ logo_src }}?cb={{ site.uj.cache_breaker }}" alt="{{ logo_text }} Logo"/>
|
|
14
14
|
</div>
|
|
15
15
|
{% endiftruthy %}
|
|
16
16
|
{% iftruthy logo_text %}
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
<h5 class="offcanvas-title d-flex align-items-center" id="mobileSidebarLabel">
|
|
187
187
|
{% iftruthy logo_src %}
|
|
188
188
|
<div class="avatar avatar-md me-2">
|
|
189
|
-
<img src="{{ logo_src }}" alt="{{ logo_text }} Logo"/>
|
|
189
|
+
<img src="{{ logo_src }}?cb={{ site.uj.cache_breaker }}" alt="{{ logo_text }} Logo"/>
|
|
190
190
|
</div>
|
|
191
191
|
{% endiftruthy %}
|
|
192
192
|
{% iftruthy logo_text %}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<a class="navbar-brand d-inline-flex align-items-center py-0" href="{{ logo_href }}">
|
|
10
10
|
{% iftruthy logo_src %}
|
|
11
11
|
{% if data.logo.type == 'wordmark' %}
|
|
12
|
-
<img src="{{ logo_src }}" alt="{{ logo_text }} Logo" class="{{ logo_class }}" style="height: 2rem; width: auto;"/>
|
|
12
|
+
<img src="{{ logo_src }}?cb={{ site.uj.cache_breaker }}" alt="{{ logo_text }} Logo" class="{{ logo_class }}" style="height: 2rem; width: auto;"/>
|
|
13
13
|
{% else %}
|
|
14
14
|
<div class="avatar avatar-md me-2 {{ logo_class }}">
|
|
15
|
-
<img src="{{ logo_src }}" alt="{{ logo_text }} Logo"/>
|
|
15
|
+
<img src="{{ logo_src }}?cb={{ site.uj.cache_breaker }}" alt="{{ logo_text }} Logo"/>
|
|
16
16
|
</div>
|
|
17
17
|
{% endif %}
|
|
18
18
|
{% endiftruthy %}
|
|
@@ -92,7 +92,7 @@ prerender_icons:
|
|
|
92
92
|
{% for rating in page.resolved.feedback_form.ratings %}
|
|
93
93
|
<div class="col-6 col-sm-3">
|
|
94
94
|
<button type="button" class="feedback-rating-btn w-100 border rounded-3 bg-body text-center" data-rating="{{ rating.id }}">
|
|
95
|
-
<img src="{{ rating.image }}" alt="{{ rating.label }}" class="feedback-rating-img mb-2" width="64" height="64" loading="eager">
|
|
95
|
+
<img src="{{ rating.image }}?cb={{ site.uj.cache_breaker }}" alt="{{ rating.label }}" class="feedback-rating-img mb-2" width="64" height="64" loading="eager">
|
|
96
96
|
<span class="d-block small fw-semibold text-muted">{{ rating.label }}</span>
|
|
97
97
|
</button>
|
|
98
98
|
</div>
|
package/docs/common-mistakes.md
CHANGED
|
@@ -13,3 +13,4 @@
|
|
|
13
13
|
11. **Using native fetch** — always use `wonderful-fetch` or `authorized-fetch`.
|
|
14
14
|
12. **XSS — unescaped dynamic data in innerHTML** — Use `webManager.utilities().escapeHTML()`. Dynamic URLs in `href`/`src`/`action`/`window.location`/`window.open` ALSO need `webManager.utilities().sanitizeURL()` — `escapeHTML` alone lets `javascript:` execute. See [xss-prevention.md](xss-prevention.md).
|
|
15
15
|
13. **Leaving Liquid `{{ }}` or `{% %}` inside moved JS modules** — Jekyll does NOT process `src/assets/js/**/*.js`. Use `data-*` attribute bridges or `<template>` cloning.
|
|
16
|
+
14. **🚫 `<img src>` without cachebreakers** — every `<img src>` in includes/layouts MUST append `?cb={{ site.uj.cache_breaker }}` to the URL. This applies to logos, brandmarks, rating images — any image rendered via a Liquid variable. Without it, browsers serve stale cached versions indefinitely when the image file changes on the CDN. External third-party URLs are exempt. `data-lazy="@src"` is handled at the JS layer, not in the HTML.
|
package/docs/jekyll-plugin.md
CHANGED
|
@@ -6,7 +6,7 @@ Ultimate Jekyll uses the `jekyll-uj-powertools` gem for custom Liquid functional
|
|
|
6
6
|
|
|
7
7
|
## Available Features
|
|
8
8
|
|
|
9
|
-
- **Filters:** `uj_strip_ads`, `uj_json_escape`, `uj_title_case`, `uj_content_format`, `uj_hash`
|
|
9
|
+
- **Filters:** `uj_strip_ads`, `uj_json_escape`, `uj_title_case`, `uj_content_format`, `uj_hash`, `uj_append_param`, `uj_cachebreak`
|
|
10
10
|
- **Tags:** `iftruthy`, `iffalsy`, `uj_icon`, `uj_logo`, `uj_image`, `uj_member`, `uj_post`, `uj_readtime`, `uj_social`, `uj_translation_url`, `uj_fake_comments`, `uj_language`
|
|
11
11
|
- **Global Variables:** `site.uj.cache_breaker`
|
|
12
12
|
- **Page Variables:** `page.random_id`, `page.extension`, `page.layout_data`, `page.resolved`
|
|
@@ -67,3 +67,5 @@ asset_path: blog/post
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Uses `/assets/css/pages/{{ asset_path }}.bundle.css` instead of deriving from `page.canonical.path`. Useful when multiple pages share assets (e.g., all blog posts). See also [docs/layouts-and-pages.md](layouts-and-pages.md).
|
|
70
|
+
|
|
71
|
+
**⚠️ Only set `asset_path` when sharing a module between pages.** Without it, the loader resolves `<pagePath>/index.js` automatically — that's the correct default for pages whose JS lives at `src/assets/js/pages/<pagePath>/index.js`. Setting `asset_path` overrides this to look for an **exact file** (`<asset_path>.js`), NOT a directory's `index.js`. A wrong `asset_path` fails **silently** — the page renders but the module never loads.
|