site

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package site implements site building.

Index

Constants

View Source
const TemplateExt = ".tmpl"

TemplateExt is a template file extension.

Variables

View Source
var SupportedFormats = []string{".html", ".md"}

SupportedFormats contains supported page formats.

Functions

This section is empty.

Types

type Page added in v0.10.0

type Page struct {
	URI         string            `yaml:"uri"`
	Content     string            `yaml:"-"`
	Title       string            `yaml:"title"`
	Description string            `yaml:"description"`
	MetaTags    map[string]string `yaml:"meta_tags"`
	Template    string            `yaml:"template"`
	// contains filtered or unexported fields
}

Page represents a site page.

func (*Page) Build added in v0.10.0

func (p *Page) Build() error

Build builds a site page to dst.

type Site

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

Site represents a site.

func New

func New(src, dst string, minify bool) (*Site, error)

New returns a new site.

func (*Site) Build

func (s *Site) Build() error

Build builds the site.

func (*Site) Clean

func (s *Site) Clean() (err error)

Clean removes all generated files.

func (*Site) Serve

func (s *Site) Serve(addr string) error

Serve starts local HTTP server, serving the site.

Jump to

Keyboard shortcuts

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