Documentation
¶
Index ¶
- Constants
- func FrontendAssetURL(value string) string
- func Open(document protocol.DocumentAttributes) string
- type Shell
- func (s Shell) ClientDocument(props json.RawMessage) ([]byte, error)
- func (s Shell) Render(w io.Writer, head, body []byte, props json.RawMessage, ...) error
- func (s Shell) WritePreamble(w io.Writer, head []byte, document protocol.DocumentAttributes) error
- func (s Shell) WriteSuffix(w io.Writer, props json.RawMessage) error
Constants ¶
const (
// AssetPrefix is the HTTP prefix under which built assets are served.
AssetPrefix = "/_bifrost/"
)
Variables ¶
This section is empty.
Functions ¶
func FrontendAssetURL ¶
FrontendAssetURL converts a build artifact path into a browser URL. Absolute URLs pass through for the Vite development server.
func Open ¶
func Open(document protocol.DocumentAttributes) string
Open writes the opening tags for a document with the given attributes.
Types ¶
type Shell ¶
type Shell struct {
// contains filtered or unexported fields
}
Shell is an immutable HTML document shell for one client asset set. The streaming runtime uses WritePreamble and WriteSuffix around body frames; the build command uses Render to assemble a complete static document.
func (Shell) ClientDocument ¶
func (s Shell) ClientDocument(props json.RawMessage) ([]byte, error)
ClientDocument assembles a mount-only document with empty props.
func (Shell) Render ¶
func (s Shell) Render(w io.Writer, head, body []byte, props json.RawMessage, document protocol.DocumentAttributes) error
Render assembles a complete document from pre-rendered head and body bytes.
func (Shell) WritePreamble ¶
WritePreamble writes the document opening, dynamic head, and the fixed head/body transition.
func (Shell) WriteSuffix ¶
WriteSuffix writes the closing body and hydration scripts.