Skip to content

docs: document the Metadata type, typed page props, JSON-LD, and preconnect on the docs site #580

Description

@vivek7405

Problem

The typed-metadata and typed-route surfaces are complete in agent-docs/ but missing from the two docs-site pages an author actually lands on:

Implementation notes (for the implementing agent)

  • Where to edit:
    • docs/app/docs/typescript/page.ts: add a "Typed metadata and page props" section covering import type { Metadata } from '@webjsdev/core', PageProps<R> / LayoutProps<R> / RouteHandlerContext<R>, the webjs types command, and the generated .webjs/routes.d.ts route union.
    • docs/app/docs/metadata-routes/page.ts: annotate the metadata example with Metadata, add a JSON-LD (jsonLd) subsection, and add metadata.preconnect / metadata.dnsPrefetch (plus the auto-vendor preconnect note).
  • Source of truth to copy from: agent-docs/metadata.md (around L17 for the type, L198 to L231 for preconnect, L235 for JSON-LD), agent-docs/typescript.md (around L190 for the type, L215 for props, L252 for the route union), agent-docs/advanced.md (around L187 to L210 for preconnect).
  • Note: the ?v= asset-hash half of Content-hash asset URLs for immutable cache, add preconnect hints #243 is already documented on the no-build and deployment pages; only the preconnect half is missing.

Acceptance criteria

  • The typescript docs page documents the Metadata type, PageProps / LayoutProps, webjs types, and the route union.
  • The metadata-routes docs page annotates metadata with Metadata, documents jsonLd, and documents preconnect / dnsPrefetch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions