1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-27 08:34:42 +01:00
gojekyll/pages/interfaces.go
2017-07-10 13:23:51 -04:00

32 lines
625 B
Go

package pages
import (
"io"
"github.com/osteele/gojekyll/config"
"github.com/osteele/gojekyll/pipelines"
)
// A Document is a Jekyll post, page, or file.
type Document interface {
// Paths
Permalink() string // relative URL path
SourcePath() string // relative to the site source directory
OutputExt() string
// Output
Published() bool
Static() bool
Write(io.Writer) error
Categories() []string
Tags() []string
}
// Site is the interface that the site provides to a page.
type Site interface {
Config() *config.Config
RenderingPipeline() pipelines.PipelineInterface
OutputExt(pathname string) string
}