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(calendar): remove hardcoded api key and inject via env var
- Removes the hardcoded Google Calendar API key from JS.
- Injects the key via 'GOOGLE_CALENDAR_API_KEY' environment variable.
- Adds a fallback to 'site.Params.google_calendar_api_key' in hugo.yaml.
- Sets a default 'PLACEHOLDER_VALUE' in hugo.yaml.
- Implements graceful degradation: if the key is missing or is the placeholder, the calendar displays a 'not available' message instead of crashing.
Closes#45
console.warn('Google Calendar API key is missing. Calendar will not render.');
13
+
calendarEl.innerHTML='<div style="padding: 20px; border: 1px solid #ccc; background: #f9f9f9; text-align: center;">Community Calendar is not available in this environment (missing API Key).</div>';
0 commit comments