Documentation
¶
Overview ¶
Package devserver runs a local HTTP preview of the digest HTML templates with browser live-reload. It renders the digest/swipe/archive views from a fixed digest, re-reading templates from disk on every request, and pushes a reload to connected browsers whenever a *.tmpl file under the templates directory changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶ added in v0.4.0
Export renders the same page set Run serves into dir as static HTML and returns, without starting an HTTP server. Files use the bare filenames the pages link to, so relative links between them resolve when opened from disk. Pages are self-contained (inline CSS/JS) except the archive index and swipe page, which fetch manifest.json client-side; serve dir over HTTP to view those.
Types ¶
type Options ¶
type Options struct {
Addr string // listen address, e.g. ":8099"
TemplatesDir string // directory holding *.tmpl files, watched for changes
AssetsDir string // directory of Vite-built assets (*.css/*.js), read on disk and watched
OpenBrowser bool // open the default browser at startup
Digests []models.Digest // digests listed in the archive and served individually
Feeds []models.Feed // feeds listed on the sources page (empty for the sample fixture)
Theme string // template layout name; empty = default
}
Options configures the dev preview server.