Skip to content

Commit b167b4f

Browse files
ghuronclaude
andcommitted
Clean up repo: remove local copies of external scripts, rename ? files
- Restore HubSpot (5588577.js, forms/v2.js) and Google Site Kit consent mode JS to their external CDN URLs; remove local copies - Remove uc.js (unused since Cookiebot loads from CDN directly) - Remove wp-security-hardening plugin assets (Font Awesome unused on page) - Remove Google external scripts that wget saved locally (gtag, optimize, ai/gen-app-builder, pagead) - Rename all ?ver=/?t= files to clean names; update references in index.html and icons.css - Add .gitignore to exclude .claude/ directory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0ce4f8a commit b167b4f

29 files changed

Lines changed: 42 additions & 10932 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.claude/

5588577.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,35 @@ curl -o wp-content/themes/cleanslate/althubspot.css \
3939

4040
Check the browser Network tab for any remaining 404s after first deploy.
4141

42-
### 3. Files with `?ver=...` query strings
42+
### 3. Files with `?` in their name — what to keep and what to fix
4343

44-
wget saves files with a literal `?` in the filename
45-
(e.g. `theme.js?ver=1773578688`). The HTML references them with a
46-
URL-encoded `%3F` (e.g. `src="theme.js%3Fver=1773578688"`).
44+
wget saves files with a literal `?` in the filename when the source URL had
45+
a query string (e.g. `theme.js?ver=1773578688`, `lucide.woff2?t=123`).
46+
These are fine for genuine local assets (theme JS/CSS, fonts).
4747

48-
Python's `http.server` decodes `%3F` back to `?` before the filesystem
49-
lookup, so local serving works correctly without renaming files.
48+
**Do not commit local copies of external Google service scripts.** wget will
49+
download `gtag/js?id=...`, `optimize.js?id=...`, `ai/gen-app-builder/client?hl=...`,
50+
and GTM's `ns.html?id=...` as local files, but these scripts update frequently
51+
and must stay on their original CDN URLs. Restore them in `index.html`:
52+
53+
```html
54+
<!-- Google Analytics -->
55+
<script src="https://www.googletagmanager.com/gtag/js?id=GT-NFB2FD3" ...></script>
56+
<!-- Google Optimize -->
57+
<script src="https://www.googleoptimize.com/optimize.js?id=OPT-K6FFQ3T"></script>
58+
<!-- Google AI search widget -->
59+
<script src="https://cloud.google.com/ai/gen-app-builder/client?hl=en_US"></script>
60+
<!-- GTM noscript iframe -->
61+
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NJLPZ5R" ...></iframe>
62+
```
63+
64+
Also delete `pagead/` — it's a Google Ads conversion pixel response page, not
65+
needed in the repo.
66+
67+
**How the `?ver=...` theme files are served locally** (Python `http.server`):
68+
The HTML references them with URL-encoded `%3F` (e.g. `src="theme.js%3Fver=..."`).
69+
The browser sends `%3F` as part of the path (not a query string), so Python
70+
decodes it to `?` and finds the file on disk.
5071

5172
For files where the browser sends a real query string (e.g. `althubspot.css?ver=...`),
5273
Python's `http.server` strips the query part and serves `althubspot.css` — so

ai/gen-app-builder/client?hl=en_US

Lines changed: 0 additions & 1 deletion
This file was deleted.

forms/v2.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

gtag/js?id=GT-NFB2FD3

Lines changed: 0 additions & 1206 deletions
This file was deleted.

0 commit comments

Comments
 (0)