target

package
v0.0.0-...-c7f67dd Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasNode

type AliasNode struct {
	Permalink string
	Page      interface{}
}

type AliasPublisher

type AliasPublisher interface {
	Translator
	Publish(path string, permalink string, page interface{}) error
}

type Filesystem

type Filesystem struct {
	PublishDir string
}

func (*Filesystem) Publish

func (fs *Filesystem) Publish(path string, r io.Reader) (err error)

func (*Filesystem) Translate

func (fs *Filesystem) Translate(src string) (dest string, err error)

type HTMLRedirectAlias

type HTMLRedirectAlias struct {
	PublishDir string
	Templates  *template.Template
	AllowRoot  bool // for the language redirects
}

func (*HTMLRedirectAlias) Publish

func (h *HTMLRedirectAlias) Publish(path string, permalink string, page interface{}) (err error)

func (*HTMLRedirectAlias) Translate

func (h *HTMLRedirectAlias) Translate(alias string) (aliasPath string, err error)

type InMemoryTarget

type InMemoryTarget struct {
	Files map[string][]byte
}

func (*InMemoryTarget) Publish

func (t *InMemoryTarget) Publish(label string, reader io.Reader) (err error)

func (*InMemoryTarget) Translate

func (t *InMemoryTarget) Translate(label string) (dest string, err error)

type OptionalTranslator

type OptionalTranslator interface {
	TranslateRelative(string) (string, error)
}

TODO(bep) consider other ways to solve this.

type Output

type Output interface {
	Publisher
	Translator
}

type PagePub

type PagePub struct {
	UglyURLs         bool
	DefaultExtension string
	PublishDir       string

	// LangDir will contain the subdir for the language, i.e. "en", "de" etc.
	// It will be empty if the site is rendered in root.
	LangDir string
}

func (*PagePub) Publish

func (pp *PagePub) Publish(path string, r io.Reader) (err error)

func (*PagePub) Translate

func (pp *PagePub) Translate(src string) (dest string, err error)

func (*PagePub) TranslateRelative

func (pp *PagePub) TranslateRelative(src string) (dest string, err error)

type PagePublisher

type PagePublisher interface {
	Translator
	Publish(string, template.HTML) error
}

type Publisher

type Publisher interface {
	Publish(string, io.Reader) error
}

type Translator

type Translator interface {
	Translate(string) (string, error)
}

Jump to

Keyboard shortcuts

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