Fix broken codelab rendering: self-host codelab-elements assets - #407
Merged
Merged
Conversation
Google locked down the storage.googleapis.com/claat-public/ bucket and all five codelab-elements assets (css + 4 js) now return 403, so every codelab rendered as unstyled raw HTML. The landing page was unaffected (it uses the site's own bundle). Replace the dead claat-public URLs in all 53 codelab index.html files with the copies the site already self-hosts at /elements/codelab-elements/ (verified returning 200 in prod). In-place URL swap only: no re-export, so each codelab.json "updated" date is preserved and the diff is exactly the five asset lines per file. The claat export template is fixed separately in SolaceDev/google-tools so future exports emit these URLs automatically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Collaborator
Author
|
Admin-merging this PR.
The two checks that can run both passed ( Note: merging does not deploy on its own — the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
All codelabs on https://codelabs.solace.dev render as unstyled raw HTML — the formatting is completely broken. The landing/menu page is unaffected.
Root cause: every codelab's
index.htmlloads its styling + rendering engine from Google's public bucketstorage.googleapis.com/claat-public/. Google locked that bucket down and all five assets now return 403 Forbidden:codelab-elements.css(styling)codelab-elements.js(upgrades the<google-codelab-*>custom elements into the paged layout)native-shim.js,custom-elements.min.js,prettify.jsWithout the CSS/JS, the custom elements never load or get styled → raw scroll. This is a Google-side change, not a regression in this repo.
Fix
Repoint all five asset URLs in every codelab to the copies the site already self-hosts at
/elements/codelab-elements/(served fromsolace-dev-codelabs-site, verified returning 200 in production).In-place URL swap only — deliberately not a claat re-export:
codelab.jsonupdateddate is preserved (claat would rewrite them to export time).codelab.jsontouched.Covers all 53 codelabs, including 13 legacy "Integration Guides" that have no markdown source and therefore can't be regenerated by claat.
Companion change
The claat export template is fixed separately in SolaceDev/google-tools#3 so all future exports emit these self-hosted URLs automatically (CI builds claat from that repo's
main). This PR fixes the already-committed HTML.Deploy note
This is a
codelabs/**-only change, soexport-codelab.yml/site-update.ymlwill not auto-trigger (they watchmarkdown/**). After merge, thesolace-dev-codelabs-sitesubmodule pointer must be bumped to redeploy via Netlify.Verification
grep -rc "storage.googleapis.com/claat-public" codelabs/→ 0 everywhere./elements/codelab-elements/*URLs return 200 in prod.🤖 Generated with Claude Code