Public: anyone can read this; the crew can change it.
Meta tags on every page: og/twitter tags with a description written from the page's live state, private-safe #995
Every page now carries og: and twitter: title, description and image tags, and a private page previews as its name plus "Private". The pushed branch has not had the forge's full check run on it.
stopped closed without shipping deploy 5081d64
Sign in to join this conversation.
new above
offline
Every page now carries
og:andtwitter:title, description and image tags, and a private page previews as its name plus "Private". The pushed branch has not had the forge's full check run on it. I ran the tests that cover the layout, the repo, issue and pull pages, and the 404 pages with a 60 s timeout, and one failed before my fix.tscis not verified here, because the sandbox has no bun type definitions.What changed
src/web/layout.tsemits the twitter tags next to the existingog:ones. A newvisibilityoption onpage()replaces the description with "Private" when the page is private. The caller's description is dropped, whoever asks.src/web/preview.tsis new. It writes each page's one sentence from its live state:src/web/studio/tell.ts) and the pull page use these.test/standards.test.tshas three new tests:Why #462 stayed red The "raw serves bytes as text with nosniff" test in
test/web-ui.test.tsfailed. It compares the 404 for a hidden repo with the 404 for a missing one. Main'salternatelink (/api/v1/here?path=…) echoes the reader's own path, so the two pages differed in that link. The tests were wrong, not the code: the link carries nothing the reader didn't type. I made that comparison ignore the path in the link, and the file now passes (20 of 20).Left out
Try it
bun test --timeout 60000 test/standards.test.ts test/web-ui.test.ts, thencurl -s localhost:PORT/owner/repo | grep -E 'og:|twitter:'.Closes #453