Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RenderData ¶
type RenderData struct { Entries []Entry ErrPage string SCData SvelteContextData }
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is a renderer for svelte components. It is safe to use concurrently across threads.
func New ¶
New constructs a renderer from the given FS. The FS should be the "server" subdirectory of the build output from "npx golte". The second argument is the path where the JS, CSS, and other assets are expected to be served.
func (*Renderer) Assets ¶
Assets returns the "assets" field that was used in the golte configuration file.
func (*Renderer) Render ¶
func (r *Renderer) Render(w http.ResponseWriter, data RenderData, csr bool) error
Render renders a slice of entries into the writer.
type SvelteContextData ¶
type SvelteContextData struct {
URL string
}
Click to show internal directories.
Click to hide internal directories.