2017-06-24 17:19:21 +02:00
|
|
|
package pages
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
2017-07-07 01:31:36 +02:00
|
|
|
"github.com/osteele/gojekyll/config"
|
2017-06-24 20:00:19 +02:00
|
|
|
"github.com/osteele/gojekyll/pipelines"
|
2017-06-24 17:19:21 +02:00
|
|
|
)
|
|
|
|
|
2017-07-09 01:57:41 +02:00
|
|
|
// A Document is a Jekyll post, page, or file.
|
2017-06-29 16:13:25 +02:00
|
|
|
type Document interface {
|
2017-06-24 17:19:21 +02:00
|
|
|
// Paths
|
2017-07-09 01:57:41 +02:00
|
|
|
Permalink() string // relative URL path
|
|
|
|
SourcePath() string // relative to the site source directory
|
2017-06-24 17:19:21 +02:00
|
|
|
OutputExt() string
|
|
|
|
|
|
|
|
// Output
|
|
|
|
Published() bool
|
|
|
|
Static() bool
|
2017-07-10 19:23:51 +02:00
|
|
|
Write(io.Writer) error
|
2017-06-24 17:19:21 +02:00
|
|
|
|
2017-07-03 15:37:14 +02:00
|
|
|
Categories() []string
|
|
|
|
Tags() []string
|
2017-06-24 17:19:21 +02:00
|
|
|
}
|
|
|
|
|
2017-07-10 19:23:51 +02:00
|
|
|
// Site is the interface that the site provides to a page.
|
|
|
|
type Site interface {
|
2017-07-07 01:31:36 +02:00
|
|
|
Config() *config.Config
|
2017-07-10 19:23:51 +02:00
|
|
|
RenderingPipeline() pipelines.PipelineInterface
|
2017-06-24 17:58:12 +02:00
|
|
|
OutputExt(pathname string) string
|
2017-06-24 17:19:21 +02:00
|
|
|
}
|