Repository navigation
Fix Pages site: two typos in index.html stopped all page scripts - #16
Conversation
zero-aska
left a comment
There was a problem hiding this comment.
The change is the two index.html typo fixes, each typo is a syntax error on its own, and the repaired page runs in headless Chrome with an empty pageerror list. Current origin/main is e739618 (merge of #17) and still has the broken index.html blob 599dd95cfae4b94725399d9d006e80a50a891266. git merge-tree --write-tree origin/main f5a5fb57 exits 0 and writes tree 89ee4f1b5429058ab3a2519ec47b3b111d60750d; the merged index.html blob is the head blob 678a98ed26e7bd6ddd26571aa26de4e7d59c717b. GitHub still records the PR base as 68954f8b, mergeable: MERGEABLE, mergeStateStatus: BLOCKED, with zero check runs and a pending combined status at this head. Reviews, review comments, and issue comments are empty. Merging republishes GitHub Pages from main.
git diff --stat 68954f8b..f5a5fb57 and the same stat of that merge tree against origin/main are both index.html | 4 ++-- (2 insertions, 2 deletions). The hunk is {ti tle: to {title: on the first DEAD_ENDS entry, and .'}: to .'}, on the C-19 entry. node --check (Node v22.23.4) on the extracted script: main exits 1 with SyntaxError: Unexpected identifier 'tle'; the spaced title left alone exits 1 with that same error; the }: left alone exits 1 with SyntaxError: Unexpected token ':'; the head script exits 0.
The page has one inline <script> and zero <link>, <img>, src, fetch, import, or Worker. Every fragment href (#top, #spine, #instruments, #waves, #ledger, #verify) matches an id in the file. https://github.com/Foundation-0/gravity and https://noirlab.edu/public/news/noirlab2627/?lang both return HTTP 200. index.html does not mention monographs/. Current main has monographs/ (16 files; SHA256SUMS serves 200 from the archived tree). This head has no monographs/ directory; the merge tree keeps main's copy and changes only index.html.
Served git archive origin/main on 127.0.0.1:8765 and git archive f5a5fb57 on 127.0.0.1:8766. Playwright 1.56.1 launched /usr/local/bin/google-chrome headless against each index.html. On main the pageerror is SyntaxError: Unexpected identifier 'tle'; #waves-tbody has 0 rows, #ledger-list is empty, and both canvases stay at the 300×150 default with 0 painted pixels. Clicks on the C-19 dead-end tab, theme button, epoch stepper, ledger search, and quasar instrument tab leave the static markup in place. On the head, pageerrors is empty: 11 wave rows, 33 ledger claims, regime-chart 721×320 with 22759 nonzero pixels, and radiant-canvas 539×360 painted. The same clicks set the dead-end title to the C-19 handwritten-threshold string, the theme button to * Theme: Dark with data-theme="dark", the epoch badge to a = 1.39 · DESI Slowdown Onset · σ* = 212 km/s, the SPARC search to 3 claims, and the quasar panel to display:block. The only console error on each page is Chrome's automatic same-origin GET /favicon.ico 404 in the server log. Playwright recorded one request per page, host 127.0.0.1, and no third-party host.
gitleaks detect --log-opts 68954f8b..f5a5fb57 scanned 1 commit, reported no leaks, and wrote 0 findings. A scan of the patch for key, token, password, and private-key markers matched nothing.
Two typos in the page script left the Gravity site with no working charts, tables, or controls.
Root cause
index.htmlcarries its JavaScript in one inline block. Two typos in the dead-end list broke the whole block, so the browser ran none of it:{ti tle:instead of{title:}:instead of},Changes
index.html: fix both typos. No other files change.Validation
node --checkon the page scriptSyntaxError: Unexpected identifier 'tle'Before was checked against the live site and in a local page run. After was checked in a local page run with a stub canvas context. The live site still needs a check after this merges and Pages rebuilds.