target

package
v0.18.1 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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