dev

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(project string, options Options) error

Types

type BuildState

type BuildState struct {
	Status      string               `json:"status"`
	Pages       int                  `json:"pages"`
	Files       int                  `json:"files"`
	DurationMS  int64                `json:"durationMs"`
	Diagnostics []content.Diagnostic `json:"diagnostics,omitempty"`
	Error       string               `json:"error,omitempty"`
	BuiltAt     time.Time            `json:"builtAt"`
	Revision    int64                `json:"revision"`
}

type ContributionSession

type ContributionSession struct {
	SiteURL     string `json:"siteURL"`
	Repository  string `json:"repository"`
	SourcePath  string `json:"sourcePath,omitempty"`
	Route       string `json:"route,omitempty"`
	Branch      string `json:"branch"`
	Guide       string `json:"guide,omitempty"`
	Goal        string `json:"goal,omitempty"`
	StartCommit string `json:"startCommit,omitempty"`
}

ContributionSession describes the public page that launched a local contributor checkout. It contains no credentials.

type Options

type Options struct {
	Host         string
	Port         int
	AutoPort     bool
	OpenBrowser  bool
	Authoring    bool
	Token        string
	Version      string
	Workspace    *WorkspaceAssets
	Contribution *ContributionSession
}

type Server

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

func NewServer

func NewServer(project string, options Options) (*Server, error)

func (*Server) Handler

func (s *Server) Handler() http.Handler

type WorkspaceAssets

type WorkspaceAssets struct {
	HTML string
	CSS  string
	JS   string
}

Jump to

Keyboard shortcuts

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