Skip to content

New: Add "endpoints" guide #760

@bholmesdev

Description

@bholmesdev

Our guides for creating non-HTML pages (aka "endpoints") are pretty tough to scan as a new user. Right now, we have:

☝️ We also have different advice for endpoint return values for SSG vs. SSR. In SSR, we recommend a formatted Response object with a defined content type. In SSG, you must use a { body } object only (Response will break during builds) to output a static file. This speaks to a more fundamental issue with SSR, where it's more tacked-on than interwoven with our existing docs.

Solution: a general "endpoints" docs page would be an excellent landing spot to compare SSG and SSR approaches to non-HTML files. We are beginning to encourage .js endpoints for any clientside data fetching as well, so a dedicated page for the concept should aid in onboarding SSR users.

Metadata

Metadata

Assignees

Labels

add new contentDocument something that is not in docs. May require testing, confirmation, or affect other pages.tscguidance required from Technical Steering Committee

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions