Files
paperclip-docs/package.json
T
b214cdebda [codex] Improve docs Lighthouse scores (#41)
## Summary

Improves the docs page Lighthouse profile for the report attached to
[PAP-12441](/PAP/issues/PAP-12441).

- Removed render-blocking third-party docs shell requests for Google Tag
Manager, Google Fonts, and Lucide.
- Vendored the existing `[email protected]` parser locally and copied
`site/vendor` into release builds.
- Replaced Lucide runtime icon rendering with inline SVG paths for the
existing docs section icons.
- Fixed reported accessibility issues: mobile zoom disabling, hidden
drawer focusability, TOC ARIA semantics, footer heading order,
muted-text contrast, TOC button accessible name, and article link
affordance.
- Added smaller responsive WebP variants for the dashboard overview
screenshot and explicit dimensions/fetch hints for article images.
- Minified CSS in release builds.

## Canary

- Commit preview: https://2f89e7fc.paperclip-docs-74t.pages.dev
- Branch preview:
https://codex-lighthouse-docs-scores.paperclip-docs-74t.pages.dev
- Target route from the report:
https://2f89e7fc.paperclip-docs-74t.pages.dev/guides/getting-started/five-minute-path/

## Root Cause

The docs shell was paying for several third-party render-blocking
requests before first contentful render, and the target guide loaded a
large full-size dashboard PNG for a small mobile viewport. Several
Lighthouse accessibility audits were caused by UI semantics rather than
content: a hidden but focusable drawer, menu roles around plain links, a
non-zoomable viewport, footer heading level skips, and color-only
article links.

## Validation

- `npm run docs:build` passes.
- `npm run docs:test:static-routes` passes.
- `npm run docs:test:hierarchical-skills-nav` passes.
- `node --check site/app.js`, `node --check .site/app.js`, and `node
--check site/build-release.mjs` pass.
- Static release checks pass for preserved SEO metadata, removed
third-party assets, zoomable viewport, inert drawer, no footer headings,
underlined article links, responsive screenshot wiring, TOC nav
semantics, and copied optimized assets.
- Cloudflare Pages check passed for commit `129baaa`.

Local Lighthouse could not complete in this container because the
available cached Chromium binaries fail to start without
`libatk-1.0.so.0`. PageSpeed Online is also quota-limited from this
environment. The canary URL above is ready for a browser-capable
Lighthouse run.

---------

Co-authored-by: DevRel Gemini <[email protected]>
Co-authored-by: Paperclip <[email protected]>
2026-07-02 13:39:51 -05:00

36 lines
1.7 KiB
JSON

{
"name": "paperclip-docs",
"private": true,
"type": "module",
"scripts": {
"docs:build": "node site/build-release.mjs --base-path / --out-dir .site",
"docs:build:github-subpath": "node site/build-release.mjs --base-path /paperclip-docs/ --out-dir .site",
"docs:build:auto": "node site/build-release.mjs --base-path auto --out-dir .site",
"docs:test:static-routes": "node scripts/verify-static-routes.mjs",
"docs:test:hierarchical-skills-nav": "node scripts/verify-hierarchical-skills-nav.mjs",
"docs:serve": "python3 -m http.server 4321 --directory .site",
"sync:lint-links": "node scripts/sync/lint-links.mjs",
"sync:verify-nav": "node scripts/sync/verify-nav.mjs",
"sync:backfill-screenshots": "node scripts/sync/backfill-screenshots.mjs",
"sync:compare-window": "node scripts/sync/compare-window.mjs",
"sync:check-drift": "node scripts/sync/check-drift.mjs",
"sync:detect-renames": "node scripts/sync/detect-renames.mjs",
"sync:verify-edit": "node scripts/sync/verify-edit.mjs",
"sync:verify-screenshots": "node scripts/sync/verify-screenshots.mjs",
"sync:check": "npm run sync:lint-links && npm run sync:verify-nav && npm run sync:verify-screenshots && npm run sync:check-drift",
"sync:test": "node scripts/sync/test.mjs",
"screenshots:seed": "node scripts/screenshots/seed.mjs",
"screenshots:capture": "node scripts/screenshots/capture.mjs",
"screenshots:sync-registry": "node scripts/screenshots/sync-registry.mjs",
"screenshots:refresh": "node scripts/screenshots/run.mjs",
"screenshots:refresh:all": "node scripts/screenshots/run.mjs --all"
},
"devDependencies": {
"@playwright/test": "^1.58.2",
"esbuild": "^0.25.12"
},
"dependencies": {
"marked": "^12.0.2"
}
}