Documentation
¶
Overview ¶
Package render turns cached items into the static site.
One renderer pass (RenderAll) produces every configured river page, the unlinked firehose.html health page, and the assets. Output is deterministic for a given cache state — absolute timestamps in markup (river.js humanizes at VIEW time), stable ordering, content-derived item anchors that survive cache rebuilds — and every file is written atomically (temp+rename, world-readable 0644/0755 by design: the output is public web content served by a different user).
Presentation follows the one-voice rules: excerpts prefer a feed-provided summary, truncate the parsed tree (never a serialized string) and re-sanitize, and drop code blocks; theme resolution is user toggle over config default over OS preference, applied to tokens and the chroma palette alike.
Check dry-runs every template against synthetic fixtures so a broken template fails `firehose check`, not a live run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFallbackHealth ¶
WriteFallbackHealth writes a minimal failure page using only Sprintf so it works even when the templating layer is what broke. Used by the top-level panic handler.
Types ¶
type Renderer ¶
type Renderer struct {
// Now is injectable for tests.
Now func() time.Time
// contains filtered or unexported fields
}
Renderer renders all outputs for one run.
func New ¶
func New(cfg *firehose.Config, items firehose.ItemService, feeds firehose.FeedService) (*Renderer, error)
New constructs a Renderer, parsing the embedded templates.