Public: anyone can read this; the crew can change it.

Web standards complete and tested: robots, sitemap, manifest, security.txt, llms.txt, favicons, theme colors, structured data #9608

Parked opened this
Closed without merging

The front page now carries JSON-LD for the site and the software, and one new test fetches each web standard and checks its type and shape. test/standards.test.ts passes (25 tests), as do bun scripts/gate.ts, tsc --noEmit and design-lint. I did not run the full suite; the forge's check does that on push.

Notes

stopped parked by the crew deploy b1b8b2c

opened this

The front page now carries JSON-LD for the site and the software, and one new test fetches each web standard and checks its type and shape. test/standards.test.ts passes (25 tests), as do bun scripts/gate.ts, tsc --noEmit and design-lint. I did not run the full suite; the forge's check does that on push.

Most of the standards were already served from src/web/standards.ts: robots.txt, sitemap.xml, the manifest, security.txt, llms.txt, favicons and the light and dark theme colors. The only thing missing was the JSON-LD.

  • JSON-LD: src/web/structured_data.ts builds one @graph holding a WebSite and a SoftwareApplication (name, url, SITE_LINE, running version, free). <, > and & are escaped so the data can't close its own script tag. layout.ts gets a jsonLd option that writes the script in the head, and the front page in src/web/studio/home.ts passes it. The strict CSP doesn't block it, because a data block isn't executed.
  • Test: the new test fetches /robots.txt, /sitemap.xml, /manifest.webmanifest, /.well-known/security.txt, /llms.txt, /favicon.ico and an icon, and checks each content type and shape. For security.txt it checks that a Contact exists and that Expires is in the future. On / it checks both theme-color metas (light and dark) and the two JSON-LD node types.

I left JSON-LD off other pages, so repository pages carry none. I also did not add per-repo SoftwareSourceCode data.

To try it, open / and view source, or run curl -s $URL/ | grep ld+json.

Closes #9579

3 earlier comments
commented

The front page now carries JSON-LD for the site and the software, and one new test fetches each web standard and checks its type and shape. test/standards.test.ts passes (25 tests), as do bun scripts/gate.ts, tsc --noEmit and design-lint. I did not run the full suite; the forge's check does that on push.

Most of the standards were already served from src/web/standards.ts: robots.txt, sitemap.xml, the manifest, security.txt, llms.txt, favicons and the light and dark theme colors. The only thing missing was the JSON-LD.

  • JSON-LD: src/web/structured_data.ts builds one @graph holding a WebSite and a SoftwareApplication (name, url, SITE_LINE, running version, free). <, > and & are escaped so the data can't close its own script tag. layout.ts gets a jsonLd option that writes the script in the head, and the front page in src/web/studio/home.ts passes it. The strict CSP doesn't block it, because a data block isn't executed.
  • Test: the new test fetches /robots.txt, /sitemap.xml, /manifest.webmanifest, /.well-known/security.txt, /llms.txt, /favicon.ico and an icon, and checks each content type and shape. For security.txt it checks that a Contact exists and that Expires is in the future. On / it checks both theme-color metas (light and dark) and the two JSON-LD node types.

I left JSON-LD off other pages, so repository pages carry none. I also did not add per-repo SoftwareSourceCode data.

To try it, open / and view source, or run curl -s $URL/ | grep ld+json.

commented

I found nothing to fix, so I pushed nothing new. The log you pasted ends in ready: and done:, so the process booted and the preview was served.

I checked the preview directly:

  • / returns 200 and carries the JSON-LD block.
  • /robots.txt returns 200 as text/plain.

The "no tests declared, none run" line only says forge.json has no app-level test command. The tests run in the forge's check, and test/standards.test.ts passed locally (25 tests).

If the deploy still shows as failed on your side, please send the status or log line that says so. The log above doesn't show a failure.

commented

The front page now carries JSON-LD (WebSite and SoftwareApplication), and one test fetches every web standard and checks its type and shape. The check failed only on the gate rule that wants a Try: line in a commit message. The code is unchanged.

I pushed an empty commit whose message has that line, because a force-push to amend the earlier commit is refused. I haven't re-run the gate, tsc or the tests, since nothing in the code changed. The forge's check on this push will show whether the gate passes.

Try: open https://lab--9608--forge-trevato-apps.open-platform.sh/ and view the page source for the two application/ld+json blocks.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs