Documentation ¶
Index ¶
- func CopyStaticFiles() error
- func GetPagesPath() (*[]string, error)
- func LoadPages() (*[]Page, error)
- func NewContexts(pages []Page) map[string]Context
- func Serve(watcherServer *WatcherServer, dir string, port int)
- func WritePages(pages *[]Page) error
- type Context
- type Frontmatter
- type Page
- type PageType
- type Project
- type Template
- type WatcherServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyStaticFiles ¶
func CopyStaticFiles() error
func GetPagesPath ¶
func NewContexts ¶
func WritePages ¶
Types ¶
type Frontmatter ¶
type Page ¶
type Page struct { SourceRelativePath string SourceAbsolutePath string Filename string RelativeUrl string Type PageType Frontmatter *Frontmatter TemplateName *string Template *Template Body string // Rendered body, ready to be used in a template as Body Output string // Final output, ready to write to file }
type Project ¶
func NewProject ¶
func (*Project) CopyStaticFiles ¶
func (*Project) ForceRebuild ¶
func (*Project) PurgeBuildDir ¶
func (*Project) WritePages ¶
type WatcherServer ¶
type WatcherServer struct {
// contains filtered or unexported fields
}
func NewWatcherServer ¶
func NewWatcherServer() *WatcherServer
func (*WatcherServer) AddClient ¶
func (w *WatcherServer) AddClient(conn *websocket.Conn)
func (*WatcherServer) Broadcast ¶
func (w *WatcherServer) Broadcast(message string)
func (*WatcherServer) RemoveClient ¶
func (w *WatcherServer) RemoveClient(conn *websocket.Conn)
Click to show internal directories.
Click to hide internal directories.