Documentation
¶
Overview ¶
Package server serves generated Obsite output directories for local preview.
Index ¶
Constants ¶
View Source
const DefaultPort = 8080
DefaultPort is the default local preview port for obsite serve.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves a generated Obsite output directory over HTTP.
func (*Server) EnableLiveReload ¶
func (s *Server) EnableLiveReload()
EnableLiveReload turns on the SSE endpoint and HTML script injection used by watch mode.
func (*Server) ListenAndServe ¶
ListenAndServe starts the preview server.
func (*Server) NotifyReload ¶
func (s *Server) NotifyReload()
NotifyReload broadcasts a livereload event to connected preview clients.
Click to show internal directories.
Click to hide internal directories.