Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateServers ¶
CreateServers creates the handlers needed for serving the site(s) listed in the given configuration.
func LocateConfigFile ¶
LocateConfigFile determines where the config file should be found based on the location of the current executable
Types ¶
type Blog ¶
type Blog struct {
Root string `json:"Root"` // Root of the blog on the web server
Folder string `json:"Folder"` // Folder on disk
HomeArticles int `json:"HomeArticles"` // How many articles to show on the home page
FeedArticles int `json:"FeedArticles"` // How many articles to show in the atom feed
FeedTitle string `json:"FeedTitle"` // Title of the atom feed
Disabled bool // Set to true if the folder cannot be found
}
Blog represents a blog to be served
type Config ¶
type Config struct {
Servers []Server `json:"Servers"` // List of servers (addresses) we are serving
Reload bool // Whether to reload blogs on every visit (slow - don't use in production. For local editing.)
Log bool // Whether to log requests
}
Config holds the configuration of the web server
func ReadConfig ¶
ReadConfig reads the configuration file at the given location
type Host ¶
type Host struct {
Hostname string `json:"Hostname"` // name of host
VDirs []VDir `json:"VDirs"` // virtual directories for serving static files
Blogs []Blog `json:"Blogs"` // virtual directories for serving dynamic blogs
PlayEnabled bool `json:"PlayEnabled"` // whether running go code from the browser is enabled
NativeClient bool `json:"NativeClient"` // whether to use a native client when running go codde
}
Host represents data about the things to server on a given hostname
Click to show internal directories.
Click to hide internal directories.