server

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package server implements the mdv HTTP server: shell HTML, rendered fragments, live-reload SSE, embedded assets and guarded static files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Root      string
	Quiet     bool
	Theme     string // auto|light|dark
	CustomCSS string // absolute path to a user stylesheet, or "" for none
	WatchMode string // fsnotify|poll
	Logger    *log.Logger
}

Config configures a Server.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves a single Markdown root over HTTP.

func New

func New(cfg Config) *Server

New constructs a Server. Root must be an absolute, symlink-resolved path.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL