Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationName ¶
func ApplicationName(s string) option
func FromConfig ¶
func FromConfig(newConfig *Config) option
func ServeConfig ¶
func ServeConfig(s *Site) http.HandlerFunc
ServeConfig is an an http handler for serving the config struct
func UpdateConfig ¶
func UpdateConfig(s *Site) http.HandlerFunc
UpdateConfig is a handler for updating the config
Types ¶
type Config ¶
type Config struct { SitePath string `json:"sitePath,omitempty"` TmpDir string `json:"tmpDir,omitempty"` ApplicationName string `json:"applicationName,omitempty"` ConfigFilePath string `json:"configFilePath,omitempty"` GitPath string `json:"gitPath,omitempty"` CanEdit bool `json:"canEdit"` }
Config provides a structure for running a markdown wiki site
func DecodeConfig ¶
DecodeConfig deserializes a byte array to a site
type Site ¶
type Site struct { Config *Config Pages map[string]*context.Page ConfigPath string CanPublish bool }
Site retains the application state
func (*Site) FetchPages ¶
FetchPages updates the state of the site :)
Click to show internal directories.
Click to hide internal directories.