You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs): address PR review + live GitHub star count
Review fixes (site/):
- editLink baseUrl pointed at website/, now site/ (Edit-page links were wrong)
- wrap dark-first localStorage script in try/catch (no private-mode throw/FOUC)
- AskEcho: null-guard DOM lookups + early-return logging, clear pending timeout,
add "Demo - not connected" label, fix stub echo-jwt v4 -> v5
- make content `description` schema-required (build-enforced; used for SEO/OG)
- add target=_blank rel=noopener noreferrer to external homepage links
Live GitHub stars:
- fetch star count at build time (src/data/github.ts) with graceful fallback;
dedupe the two hardcoded "32.4k" spots to this single source
- add daily schedule cron + workflow_dispatch + authenticated GITHUB_TOKEN to the
deploy workflow so the count refreshes without manual deploys
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
const input = document.getElementById('ask-input') as HTMLInputElement | null;
44
+
const body = document.getElementById('ask-body');
45
+
if (!fab || !overlay || !input || !body) {
46
+
console.error('[AskEcho] missing required DOM nodes; island not initialized');
47
+
return;
48
+
}
49
+
// Portal to <body> so position:fixed + z-index escape any Starlight stacking context.
50
+
document.body.appendChild(fab);
51
+
document.body.appendChild(overlay);
52
+
const suggestHTML = body.innerHTML;
53
+
let timer: ReturnType<typeof setInterval> | undefined;
54
+
let pending: ReturnType<typeof setTimeout> | undefined;
41
55
42
-
const ANSWER =
43
-
`To add JWT authentication, use Echo's built-in <strong>JWT middleware</strong>. Register it on the routes (or group) you want to protect:\n\n<pre>import echojwt "github.com/labstack/echo-jwt/v4"\n\ne.Use(echojwt.WithConfig(echojwt.Config{\n SigningKey: []byte("your-secret"),\n}))</pre>\n\nRequests must then send <code>Authorization: Bearer <token></code>. Read claims with <code>c.Get("user")</code>.`;
// Hardcoded DEMO answer — swap the timer block in ask() for a real provider fetch.
57
+
const ANSWER =
58
+
`To add JWT authentication, use Echo's built-in <strong>JWT middleware</strong>. Register it on the routes (or group) you want to protect:\n\n<pre>import echojwt "github.com/labstack/echo-jwt/v5"\n\ne.Use(echojwt.WithConfig(echojwt.Config{\n SigningKey: []byte("your-secret"),\n}))</pre>\n\nRequests must then send <code>Authorization: Bearer <token></code>. Read claims with <code>c.Get("user")</code>.`;
<divclass="sp-cta"><ahref="https://github.com/sponsors/labstack"><iclass="ph ph-heart"></i> Become a sponsor</a></div>
74
+
<divclass="sp-cta"><ahref="https://github.com/sponsors/labstack"target="_blank"rel="noopener noreferrer"><iclass="ph ph-heart"></i> Become a sponsor</a></div>
0 commit comments