jekyll-theme-zer0 1.31.2 → 1.32.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 +4 -4
- data/CHANGELOG.md +183 -0
- data/_data/ai.yml +1 -1
- data/_data/backlog.yml +149 -28
- data/_data/features.yml +173 -17
- data/_data/navigation/admin.yml +26 -8
- data/_data/navigation/docs.yml +2 -8
- data/_data/site_builder.yml +1 -1
- data/_data/theme-manifest.yml +74 -58
- data/_data/ui-text.yml +9 -0
- data/_includes/README.md +2 -1
- data/_includes/analytics/google-analytics.html +46 -9
- data/_includes/analytics/posthog.html +101 -77
- data/_includes/components/ai-chat.html +3 -3
- data/_includes/components/author-bio.html +3 -1
- data/_includes/components/author-card.html +9 -9
- data/_includes/components/author-eeat.html +13 -3
- data/_includes/components/collection-manager.html +2 -2
- data/_includes/components/component-showcase.html +7 -7
- data/_includes/components/cookie-consent-needed.html +37 -0
- data/_includes/components/cookie-consent.html +44 -5
- data/_includes/components/page-feedback.html +10 -6
- data/_includes/components/post-card.html +2 -2
- data/_includes/components/theme-customizer.html +1 -1
- data/_includes/content/comments.html +46 -0
- data/_includes/content/giscus.html +22 -13
- data/_includes/content/intro.html +39 -3
- data/_includes/content/jsonld-software.html +4 -9
- data/_includes/content/sitemap.html +173 -17
- data/_includes/core/favicon.html +42 -6
- data/_includes/core/footer.html +38 -17
- data/_includes/core/header.html +11 -2
- data/_includes/navigation/admin-nav.html +110 -63
- data/_includes/navigation/section-sidebar.html +20 -20
- data/_includes/navigation/sidebar-config.html +17 -8
- data/_includes/navigation/sidebar-right.html +16 -2
- data/_includes/setup/wizard.html +2 -2
- data/_layouts/README.md +1 -1
- data/_layouts/admin.html +49 -20
- data/_layouts/article.html +10 -10
- data/_layouts/book-story.html +3 -7
- data/_layouts/default.html +63 -2
- data/_layouts/news.html +8 -7
- data/_layouts/note.html +2 -6
- data/_layouts/notebook.html +2 -6
- data/_layouts/recipe.html +3 -7
- data/_layouts/root.html +7 -4
- data/_layouts/section.html +43 -42
- data/_sass/components/_back-to-top.scss +9 -0
- data/_sass/components/_cookie-banner.scss +31 -0
- data/_sass/components/_page-feedback.scss +1 -1
- data/_sass/components/_ui-enhancements.scss +22 -0
- data/_sass/core/_nav-tree.scss +10 -2
- data/_sass/core/_navbar.scss +19 -5
- data/_sass/core/_obsidian.scss +19 -3
- data/_sass/core/_sidebar-categories.scss +4 -2
- data/_sass/core/_sidebar-extras.scss +3 -2
- data/_sass/layouts/_admin.scss +60 -0
- data/_sass/layouts/_navbar-extras.scss +7 -2
- data/_sass/theme/_skins.scss +124 -32
- data/_sass/tokens/_color.scss +3 -0
- data/_sass/tokens/_layers.scss +12 -5
- data/_sass/utilities/_focus.scss +12 -1
- data/assets/css/main.scss +1 -0
- data/assets/js/code-copy.js +30 -2
- data/assets/js/modules/navigation/index.js +94 -40
- data/assets/js/modules/navigation/scroll-spy.js +70 -7
- data/assets/js/setup-wizard.js +2 -2
- data/assets/js/ui-enhancements.js +46 -0
- data/scripts/ai/README.md +1 -1
- data/scripts/ai/api_call.rb +1 -1
- data/scripts/bin/audit-consumer +155 -8
- data/scripts/bin/manifest +27 -8
- data/scripts/bin/validate +3 -2
- data/scripts/ci/test_visual_evidence_autogen.py +53 -1
- data/scripts/ci/visual_evidence_autogen.py +26 -7
- data/scripts/install/ai/client.sh +1 -1
- data/scripts/lib/audit.sh +156 -0
- data/scripts/lib/preview_generator.py +1 -1
- data/scripts/translate.rb +1 -1
- data/scripts/validate-features.rb +20 -2
- metadata +5 -2
|
@@ -79,9 +79,13 @@ Privacy: Respects Do Not Track and provides opt-out mechanisms
|
|
|
79
79
|
|
|
80
80
|
{% comment %} Consent gate (privacy.require_consent): until the visitor
|
|
81
81
|
accepts the "analytics" category in the theme's cookie-consent banner
|
|
82
|
-
(localStorage "zer0-cookie-consent"), PostHog
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
(localStorage "zer0-cookie-consent"), PostHog is not loaded at all: no
|
|
83
|
+
request to PostHog and no ph_* cookie or localStorage entry. It used to
|
|
84
|
+
load opted-out with memory persistence, which still fetched array.js,
|
|
85
|
+
config.js and surveys.js before any choice was made. Accepting dispatches
|
|
86
|
+
`cookieConsentChanged`; the listener below then boots PostHog on the spot,
|
|
87
|
+
so no reload is needed. Reject keeps it off. Same record and 365-day
|
|
88
|
+
expiry as components/cookie-consent.html. {% endcomment %}
|
|
85
89
|
window.__phHasAnalyticsConsent = true;
|
|
86
90
|
if (window.posthogConfig.requireConsent) {
|
|
87
91
|
window.__phHasAnalyticsConsent = false;
|
|
@@ -89,9 +93,10 @@ Privacy: Respects Do Not Track and provides opt-out mechanisms
|
|
|
89
93
|
var __phStored = window.localStorage.getItem('zer0-cookie-consent');
|
|
90
94
|
if (__phStored) {
|
|
91
95
|
var __phConsent = JSON.parse(__phStored);
|
|
92
|
-
window.__phHasAnalyticsConsent = __phConsent && __phConsent.analytics === true
|
|
96
|
+
window.__phHasAnalyticsConsent = !!(__phConsent && __phConsent.analytics === true &&
|
|
97
|
+
(Date.now() - __phConsent.timestamp) <= 365 * 864e5);
|
|
93
98
|
}
|
|
94
|
-
} catch (e) { /* localStorage unavailable — stay
|
|
99
|
+
} catch (e) { /* localStorage unavailable — stay off */ }
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
{% comment %} Honor browser privacy signals before loading: Do Not Track
|
|
@@ -100,83 +105,102 @@ Privacy: Respects Do Not Track and provides opt-out mechanisms
|
|
|
100
105
|
(window.posthogConfig.respectGpc && window.navigator.globalPrivacyControl === true)) {
|
|
101
106
|
console.log('PostHog: respecting browser privacy signal (DNT/GPC)');
|
|
102
107
|
} else {
|
|
103
|
-
{% comment %}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
{% comment %} Everything that loads or configures PostHog runs in __phBoot,
|
|
109
|
+
once: at parse time when consent is not required or was already
|
|
110
|
+
given, otherwise when the visitor accepts analytics. {% endcomment %}
|
|
111
|
+
var __phBoot = function () {
|
|
112
|
+
if (window.__phBooted) return;
|
|
113
|
+
window.__phBooted = true;
|
|
114
|
+
{% comment %} Deferred loading: the stub below is installed immediately, so
|
|
115
|
+
posthog.capture()/opt_in_capturing() calls (e.g. from the cookie
|
|
116
|
+
banner) queue as before, but the ~130 KB library (array.js, then
|
|
117
|
+
config.js/surveys.js) is only fetched after the window `load` event
|
|
118
|
+
and the next idle period. It used to be inserted while the page was
|
|
119
|
+
still parsing and competed with first paint on mobile. The snippet is
|
|
120
|
+
PostHog's official one; the only change is that its insertBefore()
|
|
121
|
+
runs through __phInject. {% endcomment %}
|
|
122
|
+
window.__phInject = function (insert) {
|
|
123
|
+
var run = function () {
|
|
124
|
+
if (window.requestIdleCallback) window.requestIdleCallback(insert, { timeout: 3000 });
|
|
125
|
+
else setTimeout(insert, 1);
|
|
126
|
+
};
|
|
127
|
+
if (document.readyState === 'complete') run();
|
|
128
|
+
else window.addEventListener('load', run, { once: true });
|
|
115
129
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
};
|
|
119
|
-
{% comment %} PostHog Loading Script {% endcomment %}
|
|
120
|
-
!function(t,e){var o,n,p,r;e.__SV||(window.posthog && window.posthog.__loaded)||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",window.__phInject(function(){(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r)});var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init Rr Mr fi Or Ar ci Tr Cr capture Mi calculateEventProperties Lr register register_once register_for_session unregister unregister_for_session Hr getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSurveysLoaded onSessionId getSurveys getActiveMatchingSurveys renderSurvey displaySurvey canRenderSurvey canRenderSurveyAsync identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty Ur jr createPersonProfile zr kr Br opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing get_explicit_consent_status is_capturing clear_opt_in_out_capturing Dr debug M Nr getPageViewId captureTraceFeedback captureTraceMetric $r".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
|
130
|
+
{% comment %} PostHog Loading Script {% endcomment %}
|
|
131
|
+
!function(t,e){var o,n,p,r;e.__SV||(window.posthog && window.posthog.__loaded)||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",window.__phInject(function(){(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r)});var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init Rr Mr fi Or Ar ci Tr Cr capture Mi calculateEventProperties Lr register register_once register_for_session unregister unregister_for_session Hr getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSurveysLoaded onSessionId getSurveys getActiveMatchingSurveys renderSurvey displaySurvey canRenderSurvey canRenderSurveyAsync identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty Ur jr createPersonProfile zr kr Br opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing get_explicit_consent_status is_capturing clear_opt_in_out_capturing Dr debug M Nr getPageViewId captureTraceFeedback captureTraceMetric $r".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
|
121
132
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
{% comment %} Initialize PostHog with configuration {% endcomment %}
|
|
134
|
+
posthog.init(window.posthogConfig.apiKey, {
|
|
135
|
+
api_host: window.posthogConfig.apiHost,
|
|
136
|
+
person_profiles: window.posthogConfig.personProfiles,
|
|
137
|
+
autocapture: window.posthogConfig.autocapture,
|
|
138
|
+
capture_pageview: window.posthogConfig.capturePageview,
|
|
139
|
+
capture_pageleave: window.posthogConfig.capturePageleave,
|
|
140
|
+
disable_cookie: window.posthogConfig.disableCookie,
|
|
141
|
+
cross_subdomain_cookie: window.posthogConfig.crossSubdomainCookie,
|
|
142
|
+
secure_cookie: window.posthogConfig.secureCookie,
|
|
143
|
+
persistence: window.__phHasAnalyticsConsent ? window.posthogConfig.persistence : 'memory',
|
|
144
|
+
opt_out_capturing_by_default: !window.__phHasAnalyticsConsent,
|
|
145
|
+
session_recording: window.posthogConfig.sessionRecording,
|
|
146
|
+
{% if site.posthog.privacy.ip_anonymization %}
|
|
147
|
+
ip: false,
|
|
148
|
+
{% endif %}
|
|
149
|
+
loaded: function(posthog) {
|
|
150
|
+
{% comment %} PostHog loaded successfully {% endcomment %}
|
|
151
|
+
console.log('PostHog analytics loaded successfully');
|
|
141
152
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
153
|
+
{% comment %} privacy.geoip_disable: stop PostHog from resolving
|
|
154
|
+
IP to location on every event {% endcomment %}
|
|
155
|
+
if (window.posthogConfig.geoipDisable) {
|
|
156
|
+
posthog.register({ '$geoip_disable': true });
|
|
157
|
+
}
|
|
147
158
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
159
|
+
{% comment %} Track Jekyll-specific page properties. Free-text values go
|
|
160
|
+
through `jsonify`: they used to be pasted between single quotes, so
|
|
161
|
+
an apostrophe in a title or description ("you're") was a
|
|
162
|
+
SyntaxError that stopped PostHog loading at all. {% endcomment %}
|
|
163
|
+
posthog.register({
|
|
164
|
+
'site_title': {{ site.title | jsonify }},
|
|
165
|
+
'site_description': {{ site.description | strip_newlines | strip | jsonify }},
|
|
166
|
+
'jekyll_version': '{{ jekyll.version }}',
|
|
167
|
+
'theme': {{ site.remote_theme | default: site.theme | jsonify }},
|
|
168
|
+
'page_layout': {{ page.layout | jsonify }},
|
|
169
|
+
'page_collection': {{ page.collection | jsonify }},
|
|
170
|
+
{% if page.categories %}
|
|
171
|
+
'page_categories': {{ page.categories | jsonify }},
|
|
172
|
+
{% endif %}
|
|
173
|
+
{% if page.tags %}
|
|
174
|
+
'page_tags': {{ page.tags | jsonify }},
|
|
175
|
+
{% endif %}
|
|
176
|
+
'page_url': window.location.pathname,
|
|
177
|
+
'page_title': {{ page.title | strip_newlines | strip | jsonify }},
|
|
178
|
+
'page_author': {{ page.author | default: site.author.name | jsonify }},
|
|
179
|
+
{% if page.date %}
|
|
180
|
+
'page_date': '{{ page.date | date: "%Y-%m-%d" }}',
|
|
181
|
+
{% endif %}
|
|
182
|
+
'user_agent': navigator.userAgent,
|
|
183
|
+
'screen_resolution': screen.width + 'x' + screen.height,
|
|
184
|
+
'viewport_size': window.innerWidth + 'x' + window.innerHeight
|
|
185
|
+
});
|
|
175
186
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
187
|
+
{% comment %} Initialize custom event tracking {% endcomment %}
|
|
188
|
+
initializeCustomTracking();
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
if (window.__phHasAnalyticsConsent) {
|
|
194
|
+
__phBoot();
|
|
195
|
+
} else {
|
|
196
|
+
document.addEventListener('cookieConsentChanged', function (e) {
|
|
197
|
+
if (!(e.detail && e.detail.analytics === true) || window.__phBooted) return;
|
|
198
|
+
window.__phHasAnalyticsConsent = true;
|
|
199
|
+
__phBoot();
|
|
200
|
+
{% comment %} Clears an opt-out a previous Reject may have stored. {% endcomment %}
|
|
201
|
+
window.posthog.opt_in_capturing();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
180
204
|
}
|
|
181
205
|
|
|
182
206
|
{% comment %} Custom Event Tracking Functions {% endcomment %}
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"authMode": {{ ai_auth_mode | jsonify }},
|
|
186
186
|
"apiKey": {{ site.ai_chat.api_key | jsonify }},
|
|
187
187
|
"anthropicVersion": {{ site.ai_chat.anthropic_version | default: "2023-06-01" | jsonify }},
|
|
188
|
-
"model": {{ site.ai_chat.model | default: "claude-opus-
|
|
188
|
+
"model": {{ site.ai_chat.model | default: "claude-opus-5-5" | jsonify }},
|
|
189
189
|
"maxTokens": {{ site.ai_chat.max_tokens | default: 1024 }},
|
|
190
190
|
"strictContext": {{ site.ai_chat.strict_context | default: true | jsonify }},
|
|
191
191
|
"outOfScopeMessage": {{ site.ai_chat.out_of_scope_message | default: "I can only answer from the content on this page." | jsonify }},
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
position: fixed;
|
|
221
221
|
bottom: calc(var(--zer0-space-fab-offset, 1rem) + var(--zer0-space-fab-size, 3.5rem) + var(--zer0-space-fab-gap, 0.75rem));
|
|
222
222
|
right: var(--zer0-space-fab-offset, 1rem);
|
|
223
|
-
z-index: var(--zer0-layer-fab-chat,
|
|
223
|
+
z-index: var(--zer0-layer-fab-chat, 1033);
|
|
224
224
|
width: 3rem;
|
|
225
225
|
height: 3rem;
|
|
226
226
|
display: flex;
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
position: fixed;
|
|
240
240
|
bottom: calc(var(--zer0-space-fab-offset, 1rem) + 2 * (var(--zer0-space-fab-size, 3.5rem) + var(--zer0-space-fab-gap, 0.75rem)));
|
|
241
241
|
right: var(--zer0-space-fab-offset, 1rem);
|
|
242
|
-
z-index: var(--zer0-layer-fab-chat,
|
|
242
|
+
z-index: var(--zer0-layer-fab-chat, 1033);
|
|
243
243
|
width: 360px;
|
|
244
244
|
max-height: 540px;
|
|
245
245
|
display: flex;
|
|
@@ -69,7 +69,9 @@
|
|
|
69
69
|
|
|
70
70
|
{% if include.author %}
|
|
71
71
|
<aside class="author-section my-5 pt-4 border-top" aria-labelledby="about-the-author">
|
|
72
|
-
|
|
72
|
+
{%- comment -%} no_toc: theme chrome, not a section of the post (#552). The
|
|
73
|
+
id stays -- aria-labelledby above resolves to it. {%- endcomment -%}
|
|
74
|
+
<h2 id="about-the-author" class="h5 mb-3 no_toc">
|
|
73
75
|
<i class="bi bi-person-badge me-2" aria-hidden="true"></i>{{ bio_heading }}
|
|
74
76
|
</h2>
|
|
75
77
|
|
|
@@ -138,10 +138,10 @@
|
|
|
138
138
|
{% if has_avatar %}
|
|
139
139
|
<img src="{{ avatar_url }}" alt="" class="author-inline__avatar rounded-circle me-1" width="{{ avatar_size }}" height="{{ avatar_size }}" style="object-fit: cover;" loading="lazy">
|
|
140
140
|
{% else %}
|
|
141
|
-
<i class="bi bi-person-circle me-1"></i>
|
|
141
|
+
<i class="bi bi-person-circle me-1" aria-hidden="true"></i>
|
|
142
142
|
{% endif %}
|
|
143
143
|
{% else %}
|
|
144
|
-
<i class="bi bi-person me-1"></i>
|
|
144
|
+
<i class="bi bi-person me-1" aria-hidden="true"></i>
|
|
145
145
|
{% endif %}
|
|
146
146
|
{%- if include.name_itemprop -%}
|
|
147
147
|
<span class="author-name" itemprop="{{ include.name_itemprop }}">{{ author_name }}</span>
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
<img src="{{ avatar_url }}" alt="{{ author_name }}" class="rounded-circle me-3" width="{{ avatar_size }}" height="{{ avatar_size }}" style="object-fit: cover;" itemprop="image" loading="lazy">
|
|
164
164
|
{% else %}
|
|
165
165
|
<div class="author-avatar-fallback rounded-circle bg-primary text-white d-flex align-items-center justify-content-center me-3" style="width: {{ avatar_size }}px; height: {{ avatar_size }}px;">
|
|
166
|
-
<i class="bi bi-person fs-5"></i>
|
|
166
|
+
<i class="bi bi-person fs-5" aria-hidden="true"></i>
|
|
167
167
|
</div>
|
|
168
168
|
{% endif %}
|
|
169
169
|
{% endif %}
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
<img src="{{ avatar_url }}" alt="{{ author_name }}" class="author-card__avatar rounded-circle me-3" width="{{ avatar_size }}" height="{{ avatar_size }}" style="object-fit: cover;" itemprop="image" loading="lazy">
|
|
188
188
|
{% else %}
|
|
189
189
|
<div class="author-avatar-fallback rounded-circle bg-primary text-white d-flex align-items-center justify-content-center me-3" style="width: {{ avatar_size }}px; height: {{ avatar_size }}px;">
|
|
190
|
-
<i class="bi bi-person fs-1"></i>
|
|
190
|
+
<i class="bi bi-person fs-1" aria-hidden="true"></i>
|
|
191
191
|
</div>
|
|
192
192
|
{% endif %}
|
|
193
193
|
{% endif %}
|
|
@@ -219,19 +219,19 @@
|
|
|
219
219
|
{% if show_social %}
|
|
220
220
|
<div class="author-social d-flex gap-2 mt-2">
|
|
221
221
|
{% if author_data.github %}
|
|
222
|
-
<a href="https://github.com/{{ author_data.github }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="GitHub" itemprop="sameAs"><i class="bi bi-github"></i></a>
|
|
222
|
+
<a href="https://github.com/{{ author_data.github }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="GitHub" aria-label="{{ author_name | escape }} on GitHub (opens in a new tab)" itemprop="sameAs"><i class="bi bi-github" aria-hidden="true"></i></a>
|
|
223
223
|
{% endif %}
|
|
224
224
|
{% if author_data.twitter %}
|
|
225
|
-
<a href="https://x.com/{{ author_data.twitter }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="X" aria-label="X" itemprop="sameAs"><i class="bi bi-twitter-x"></i></a>
|
|
225
|
+
<a href="https://x.com/{{ author_data.twitter }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="X" aria-label="{{ author_name | escape }} on X (opens in a new tab)" itemprop="sameAs"><i class="bi bi-twitter-x" aria-hidden="true"></i></a>
|
|
226
226
|
{% endif %}
|
|
227
227
|
{% if author_data.linkedin %}
|
|
228
|
-
<a href="https://linkedin.com/in/{{ author_data.linkedin }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="LinkedIn" itemprop="sameAs"><i class="bi bi-linkedin"></i></a>
|
|
228
|
+
<a href="https://linkedin.com/in/{{ author_data.linkedin }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="LinkedIn" aria-label="{{ author_name | escape }} on LinkedIn (opens in a new tab)" itemprop="sameAs"><i class="bi bi-linkedin" aria-hidden="true"></i></a>
|
|
229
229
|
{% endif %}
|
|
230
230
|
{% if author_data.website %}
|
|
231
|
-
<a href="{{ author_data.website }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="Website" itemprop="url"><i class="bi bi-globe"></i></a>
|
|
231
|
+
<a href="{{ author_data.website }}" class="btn btn-sm btn-outline-secondary" target="_blank" rel="noopener" title="Website" aria-label="{{ author_name | escape }} website (opens in a new tab)" itemprop="url"><i class="bi bi-globe" aria-hidden="true"></i></a>
|
|
232
232
|
{% endif %}
|
|
233
233
|
{% if author_data.email %}
|
|
234
|
-
<a href="mailto:{{ author_data.email }}" class="btn btn-sm btn-outline-secondary" title="Email"><i class="bi bi-envelope"></i></a>
|
|
234
|
+
<a href="mailto:{{ author_data.email }}" class="btn btn-sm btn-outline-secondary" title="Email" aria-label="Email {{ author_name | escape }}"><i class="bi bi-envelope" aria-hidden="true"></i></a>
|
|
235
235
|
{% endif %}
|
|
236
236
|
</div>
|
|
237
237
|
{% endif %}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
(AI Engine Optimization) and E-E-A-T signals.
|
|
11
11
|
|
|
12
12
|
Parameters:
|
|
13
|
-
- author_key (optional): Key from _data/authors.yml (default:
|
|
13
|
+
- author_key (optional): Key from _data/authors.yml (default: site.author.key, else the first author)
|
|
14
14
|
- style (optional): "banner" | "card" (default: "banner")
|
|
15
15
|
|
|
16
16
|
Usage:
|
|
@@ -23,8 +23,18 @@
|
|
|
23
23
|
===================================================================
|
|
24
24
|
{% endcomment %}
|
|
25
25
|
|
|
26
|
-
{%
|
|
27
|
-
|
|
26
|
+
{% comment %} The author comes from the include, else the site's configured author key,
|
|
27
|
+
else the `default` entry of _data/authors.yml, else its first entry. No person is
|
|
28
|
+
baked into the theme. {% endcomment %}
|
|
29
|
+
{% assign author_key = include.author_key | default: site.author.key %}
|
|
30
|
+
{% if author_key == nil and site.data.authors.default %}{% assign author_key = "default" %}{% endif %}
|
|
31
|
+
{% if author_key %}
|
|
32
|
+
{% assign author = site.data.authors[author_key] %}
|
|
33
|
+
{% else %}
|
|
34
|
+
{% assign first_author = site.data.authors | first %}
|
|
35
|
+
{% assign author_key = first_author[0] %}
|
|
36
|
+
{% assign author = first_author[1] %}
|
|
37
|
+
{% endif %}
|
|
28
38
|
{% assign eeat_style = include.style | default: "banner" %}
|
|
29
39
|
|
|
30
40
|
{% comment %} Resolve avatar: full URL (e.g. GitHub) as-is, relative path prefixed,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
{% if collection.permalink %}
|
|
96
96
|
<code class="small">{{ collection.permalink }}</code>
|
|
97
97
|
{% else %}
|
|
98
|
-
<span class="text-body-
|
|
98
|
+
<span class="text-body-secondary small">default</span>
|
|
99
99
|
{% endif %}
|
|
100
100
|
</td>
|
|
101
101
|
</tr>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
</li>
|
|
141
141
|
{% endfor %}
|
|
142
142
|
{% if collection.docs.size > 5 %}
|
|
143
|
-
<li class="text-body-
|
|
143
|
+
<li class="text-body-secondary">… and {{ collection.docs.size | minus: 5 }} more</li>
|
|
144
144
|
{% endif %}
|
|
145
145
|
</ul>
|
|
146
146
|
{% endif %}
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
<button type="button" class="btn btn-primary">Default</button>
|
|
94
94
|
<button type="button" class="btn btn-primary btn-sm">Small</button>
|
|
95
95
|
<div class="btn-group" role="group" aria-label="View toggle">
|
|
96
|
-
<button type="button" class="btn btn-outline-primary"><i class="bi bi-list"></i></button>
|
|
97
|
-
<button type="button" class="btn btn-outline-primary"><i class="bi bi-grid-3x3-gap"></i></button>
|
|
98
|
-
<button type="button" class="btn btn-outline-primary"><i class="bi bi-card-text"></i></button>
|
|
96
|
+
<button type="button" class="btn btn-outline-primary" aria-label="List view"><i class="bi bi-list" aria-hidden="true"></i></button>
|
|
97
|
+
<button type="button" class="btn btn-outline-primary" aria-label="Grid view"><i class="bi bi-grid-3x3-gap" aria-hidden="true"></i></button>
|
|
98
|
+
<button type="button" class="btn btn-outline-primary" aria-label="Card view"><i class="bi bi-card-text" aria-hidden="true"></i></button>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
@@ -291,7 +291,7 @@ theme: jekyll-theme-zer0</code></pre>
|
|
|
291
291
|
<small class="text-muted">95%</small>
|
|
292
292
|
</div>
|
|
293
293
|
<div class="progress" style="height: 8px;">
|
|
294
|
-
<div class="progress-bar bg-success" role="progressbar" style="width: 95%" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100"></div>
|
|
294
|
+
<div class="progress-bar bg-success" role="progressbar" aria-label="Lighthouse Performance" style="width: 95%" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100"></div>
|
|
295
295
|
</div>
|
|
296
296
|
</div>
|
|
297
297
|
<div class="mb-3">
|
|
@@ -300,7 +300,7 @@ theme: jekyll-theme-zer0</code></pre>
|
|
|
300
300
|
<small class="text-muted">92%</small>
|
|
301
301
|
</div>
|
|
302
302
|
<div class="progress" style="height: 8px;">
|
|
303
|
-
<div class="progress-bar bg-info" role="progressbar" style="width: 92%" aria-valuenow="92" aria-valuemin="0" aria-valuemax="100"></div>
|
|
303
|
+
<div class="progress-bar bg-info" role="progressbar" aria-label="Accessibility Score" style="width: 92%" aria-valuenow="92" aria-valuemin="0" aria-valuemax="100"></div>
|
|
304
304
|
</div>
|
|
305
305
|
</div>
|
|
306
306
|
<div class="mb-3">
|
|
@@ -309,7 +309,7 @@ theme: jekyll-theme-zer0</code></pre>
|
|
|
309
309
|
<small class="text-muted">98%</small>
|
|
310
310
|
</div>
|
|
311
311
|
<div class="progress" style="height: 8px;">
|
|
312
|
-
<div class="progress-bar bg-primary" role="progressbar" style="width: 98%" aria-valuenow="98" aria-valuemin="0" aria-valuemax="100"></div>
|
|
312
|
+
<div class="progress-bar bg-primary" role="progressbar" aria-label="SEO Score" style="width: 98%" aria-valuenow="98" aria-valuemin="0" aria-valuemax="100"></div>
|
|
313
313
|
</div>
|
|
314
314
|
</div>
|
|
315
315
|
<div class="mb-3">
|
|
@@ -318,7 +318,7 @@ theme: jekyll-theme-zer0</code></pre>
|
|
|
318
318
|
<small class="text-muted">100%</small>
|
|
319
319
|
</div>
|
|
320
320
|
<div class="progress" style="height: 8px;">
|
|
321
|
-
<div class="progress-bar bg-success" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
321
|
+
<div class="progress-bar bg-success" role="progressbar" aria-label="Best Practices" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
322
322
|
</div>
|
|
323
323
|
</div>
|
|
324
324
|
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
===================================================================
|
|
3
|
+
COOKIE CONSENT GATE — does this site need a consent banner?
|
|
4
|
+
===================================================================
|
|
5
|
+
|
|
6
|
+
Path: _includes/components/cookie-consent-needed.html
|
|
7
|
+
Decides whether the cookie-consent banner, its "Manage" modal and the
|
|
8
|
+
footer "Cookie Preferences" button render. Asking consent for cookies a
|
|
9
|
+
site never sets is misleading, so the banner appears only when the build
|
|
10
|
+
configures something that needs consent (#566):
|
|
11
|
+
|
|
12
|
+
- `site.google_analytics` is set (analytics/google-analytics.html)
|
|
13
|
+
- `site.google_tag_manager` is set (analytics/google-tag-manager-head.html)
|
|
14
|
+
- `site.posthog.enabled` is true (analytics/posthog.html)
|
|
15
|
+
|
|
16
|
+
`cookie_consent.enabled` overrides the detection either way: `true` forces
|
|
17
|
+
the banner on (for trackers loaded through custom/ hooks the theme cannot
|
|
18
|
+
see), `false` suppresses it. Unset = auto.
|
|
19
|
+
|
|
20
|
+
An empty string counts as unset: the setup wizard writes
|
|
21
|
+
`google_analytics: ''` for a blank field, and '' is truthy in Liquid.
|
|
22
|
+
|
|
23
|
+
Every input is `site.*`, so callers inside include_cached stay valid.
|
|
24
|
+
|
|
25
|
+
Output is `true` or nothing. Capture it (brace-free so this comment does
|
|
26
|
+
not self-execute):
|
|
27
|
+
capture needs_consent -> include components/cookie-consent-needed.html
|
|
28
|
+
if needs_consent == "true" -> render the banner / button
|
|
29
|
+
===================================================================
|
|
30
|
+
{%- endcomment -%}
|
|
31
|
+
{%- assign _consent = false -%}
|
|
32
|
+
{%- if site.google_analytics and site.google_analytics != "" -%}{%- assign _consent = true -%}{%- endif -%}
|
|
33
|
+
{%- if site.google_tag_manager and site.google_tag_manager != "" -%}{%- assign _consent = true -%}{%- endif -%}
|
|
34
|
+
{%- if site.posthog.enabled == true -%}{%- assign _consent = true -%}{%- endif -%}
|
|
35
|
+
{%- if site.cookie_consent.enabled == true -%}{%- assign _consent = true -%}{%- endif -%}
|
|
36
|
+
{%- if site.cookie_consent.enabled == false -%}{%- assign _consent = false -%}{%- endif -%}
|
|
37
|
+
{%- if _consent -%}true{%- endif -%}
|
|
@@ -120,7 +120,7 @@ Configuration: Uses site.posthog settings from _config.yml
|
|
|
120
120
|
Analytics Cookies
|
|
121
121
|
</h3>
|
|
122
122
|
<div class="form-check form-switch">
|
|
123
|
-
<input class="form-check-input" type="checkbox" id="analyticsCookies"
|
|
123
|
+
<input class="form-check-input" type="checkbox" id="analyticsCookies">
|
|
124
124
|
<label class="form-check-label" for="analyticsCookies">Enable</label>
|
|
125
125
|
</div>
|
|
126
126
|
</div>
|
|
@@ -249,6 +249,33 @@ Configuration: Uses site.posthog settings from _config.yml
|
|
|
249
249
|
}));
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
// Reserve the banner's height while it is up. Publishes it as
|
|
253
|
+
// --zer0-cookie-banner-inset on <html> plus the zer0-cookie-banner-open
|
|
254
|
+
// class; _sass/components/_cookie-banner.scss turns that into body
|
|
255
|
+
// padding, scroll-padding-bottom (keyboard focus scrolls clear of the
|
|
256
|
+
// banner) and a lift for the floating buttons, which used to sit under
|
|
257
|
+
// it. A ResizeObserver keeps it right when the banner reflows (94px on
|
|
258
|
+
// phones, 48px from md up). Set as soon as the banner is unhidden, before
|
|
259
|
+
// the 1s slide-in, so the page does not shift when it appears.
|
|
260
|
+
let insetObserver = null;
|
|
261
|
+
function setBannerInset(banner) {
|
|
262
|
+
const root = document.documentElement;
|
|
263
|
+
const apply = () => {
|
|
264
|
+
root.style.setProperty('--zer0-cookie-banner-inset', Math.ceil(banner.offsetHeight) + 'px');
|
|
265
|
+
root.classList.add('zer0-cookie-banner-open');
|
|
266
|
+
};
|
|
267
|
+
apply();
|
|
268
|
+
if (!insetObserver && 'ResizeObserver' in window) {
|
|
269
|
+
insetObserver = new ResizeObserver(apply);
|
|
270
|
+
insetObserver.observe(banner);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function clearBannerInset() {
|
|
274
|
+
if (insetObserver) { insetObserver.disconnect(); insetObserver = null; }
|
|
275
|
+
document.documentElement.classList.remove('zer0-cookie-banner-open');
|
|
276
|
+
document.documentElement.style.removeProperty('--zer0-cookie-banner-inset');
|
|
277
|
+
}
|
|
278
|
+
|
|
252
279
|
// Show consent banner
|
|
253
280
|
function showConsentBanner() {
|
|
254
281
|
const banner = document.getElementById('cookieConsent');
|
|
@@ -257,6 +284,7 @@ Configuration: Uses site.posthog settings from _config.yml
|
|
|
257
284
|
// Reveal the element (CSS keeps it translated off-screen + opacity:0).
|
|
258
285
|
banner.hidden = false;
|
|
259
286
|
banner.classList.remove('cookie-banner-visible');
|
|
287
|
+
setBannerInset(banner);
|
|
260
288
|
|
|
261
289
|
setTimeout(() => {
|
|
262
290
|
// Force reflow so the next class change actually animates.
|
|
@@ -277,6 +305,7 @@ Configuration: Uses site.posthog settings from _config.yml
|
|
|
277
305
|
if (done) return;
|
|
278
306
|
done = true;
|
|
279
307
|
banner.hidden = true;
|
|
308
|
+
clearBannerInset();
|
|
280
309
|
banner.removeEventListener('transitionend', onEnd);
|
|
281
310
|
};
|
|
282
311
|
const onEnd = (e) => {
|
|
@@ -290,10 +319,15 @@ Configuration: Uses site.posthog settings from _config.yml
|
|
|
290
319
|
setTimeout(finish, 500);
|
|
291
320
|
}
|
|
292
321
|
|
|
293
|
-
// Update modal UI with current preferences
|
|
322
|
+
// Update modal UI with current preferences.
|
|
323
|
+
// Null-safe: this now runs on every first paint (issue #553), including on
|
|
324
|
+
// consumers that override the include and ship the banner without the
|
|
325
|
+
// preferences modal.
|
|
294
326
|
function updateModalUI(consent) {
|
|
295
|
-
document.getElementById('analyticsCookies')
|
|
296
|
-
document.getElementById('marketingCookies')
|
|
327
|
+
const analytics = document.getElementById('analyticsCookies');
|
|
328
|
+
const marketing = document.getElementById('marketingCookies');
|
|
329
|
+
if (analytics) analytics.checked = !!consent.analytics;
|
|
330
|
+
if (marketing) marketing.checked = !!consent.marketing;
|
|
297
331
|
}
|
|
298
332
|
|
|
299
333
|
// Get consent from modal UI
|
|
@@ -311,9 +345,14 @@ Configuration: Uses site.posthog settings from _config.yml
|
|
|
311
345
|
const banner = document.getElementById('cookieConsent');
|
|
312
346
|
const existingConsent = getConsentState();
|
|
313
347
|
|
|
348
|
+
// The switches must reflect the state that is actually in force, which on
|
|
349
|
+
// a first visit is `defaultConsent` (analytics/marketing OFF). Syncing
|
|
350
|
+
// only for returning visitors is what let the markup's own default win
|
|
351
|
+
// and recorded consent the visitor never gave (issue #553).
|
|
352
|
+
updateModalUI(existingConsent || defaultConsent);
|
|
353
|
+
|
|
314
354
|
if (existingConsent) {
|
|
315
355
|
applyConsent(existingConsent);
|
|
316
|
-
updateModalUI(existingConsent);
|
|
317
356
|
// Banner already starts hidden via the `hidden` attribute — nothing to do.
|
|
318
357
|
} else if (banner) {
|
|
319
358
|
showConsentBanner();
|
|
@@ -88,12 +88,16 @@
|
|
|
88
88
|
`position-fixed` is required, not cosmetic: it opts this <body> child out of
|
|
89
89
|
the .zer0-bg-body flattening rule (_sass/theme/_backgrounds.scss) that would
|
|
90
90
|
otherwise force position:relative; z-index:1 and let the cookie banner steal
|
|
91
|
-
the dialog's clicks.
|
|
91
|
+
the dialog's clicks.
|
|
92
|
+
The dialog's header and footer bars are <div>s, not <header>/<footer>: this
|
|
93
|
+
overlay is a <body> child, so those elements became a second `banner` and
|
|
94
|
+
`contentinfo` landmark beside the site's own whenever the dialog was open
|
|
95
|
+
(axe landmark-no-duplicate-banner / -contentinfo / landmark-unique, #593). {% endcomment %}
|
|
92
96
|
<div class="pf-overlay position-fixed" id="pageFeedbackModal" role="dialog" aria-modal="true"
|
|
93
97
|
aria-labelledby="pfTitle" aria-describedby="pfIntro" hidden>
|
|
94
98
|
<div class="pf-dialog shadow-lg" role="document">
|
|
95
99
|
|
|
96
|
-
<
|
|
100
|
+
<div class="pf-header">
|
|
97
101
|
<div class="pf-header-text">
|
|
98
102
|
<h2 id="pfTitle" class="pf-title h5 mb-1">
|
|
99
103
|
<i class="bi bi-megaphone me-2" aria-hidden="true"></i>Share feedback
|
|
@@ -106,7 +110,7 @@
|
|
|
106
110
|
<button type="button" class="pf-close btn btn-sm" id="pfClose" aria-label="Close feedback dialog">
|
|
107
111
|
<i class="bi bi-x-lg" aria-hidden="true"></i>
|
|
108
112
|
</button>
|
|
109
|
-
</
|
|
113
|
+
</div>
|
|
110
114
|
|
|
111
115
|
<form id="pfForm" class="pf-body" novalidate>
|
|
112
116
|
|
|
@@ -248,7 +252,7 @@
|
|
|
248
252
|
|
|
249
253
|
</form>
|
|
250
254
|
|
|
251
|
-
<
|
|
255
|
+
<div class="pf-footer">
|
|
252
256
|
<button type="button" class="btn btn-link btn-sm pf-copy" id="pfCopy">
|
|
253
257
|
<i class="bi bi-clipboard me-1" aria-hidden="true"></i>Copy details
|
|
254
258
|
</button>
|
|
@@ -259,7 +263,7 @@
|
|
|
259
263
|
<span class="pf-submit-label">Open GitHub issue</span>
|
|
260
264
|
</button>
|
|
261
265
|
</div>
|
|
262
|
-
</
|
|
266
|
+
</div>
|
|
263
267
|
|
|
264
268
|
</div>
|
|
265
269
|
</div>
|
|
@@ -280,7 +284,7 @@
|
|
|
280
284
|
"ai": {
|
|
281
285
|
"available": {{ pf_ai_available | jsonify }},
|
|
282
286
|
"auto": {{ site.page_feedback.ai.auto | default: false | jsonify }},
|
|
283
|
-
"model": {{ site.page_feedback.ai.model | default: "claude-opus-
|
|
287
|
+
"model": {{ site.page_feedback.ai.model | default: "claude-opus-5-5" | jsonify }},
|
|
284
288
|
"maxTokens": {{ site.page_feedback.ai.max_tokens | default: 1024 }}
|
|
285
289
|
}
|
|
286
290
|
}
|
|
@@ -190,10 +190,10 @@
|
|
|
190
190
|
{% if include.post.tags.size > 0 %}
|
|
191
191
|
<div class="mt-2">
|
|
192
192
|
{% for tag in include.post.tags limit: 3 %}
|
|
193
|
-
<span class="badge bg-secondary
|
|
193
|
+
<span class="badge text-bg-secondary border me-1">{{ tag }}</span>
|
|
194
194
|
{% endfor %}
|
|
195
195
|
{% if include.post.tags.size > 3 %}
|
|
196
|
-
<span class="badge bg-secondary
|
|
196
|
+
<span class="badge text-bg-secondary border">+{{ include.post.tags.size | minus: 3 }}</span>
|
|
197
197
|
{% endif %}
|
|
198
198
|
</div>
|
|
199
199
|
{% endif %}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
{% if skin == current_skin %}
|
|
49
49
|
<span class="badge bg-primary"><i class="bi bi-check-circle me-1"></i>Active</span>
|
|
50
50
|
{% else %}
|
|
51
|
-
<small class="text-body-
|
|
51
|
+
<small class="text-body-secondary">Click to preview</small>
|
|
52
52
|
{% endif %}
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|