document

package
v0.1.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package document renders the complete SEO and hydration document around a body produced by GoBeyond's portable renderer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(writer io.Writer, input Input) error

Types

type Asset

type Asset struct {
	URL       string
	Integrity string
}

type BodyHTML

type BodyHTML string

type HydrationData

type HydrationData struct {
	APIVersion string `json:"apiVersion"`
	BuildID    string `json:"buildId"`
	RouteID    string `json:"routeId"`
	Props      any    `json:"props"`
}

type Input

type Input struct {
	PublicOrigin   string
	Indexable      bool
	Metadata       gb.Metadata
	Body           BodyHTML
	Hydration      HydrationData
	Styles         []Asset
	ModulePreloads []Asset
	Scripts        []Asset
	Nonce          string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL