Documentation
¶
Index ¶
- Constants
- Variables
- type Document
- type Page
- type Site
- type StaticFile
- func (f *StaticFile) Categories() []string
- func (f *StaticFile) MarshalYAML() (interface{}, error)
- func (f *StaticFile) OutputExt() string
- func (f *StaticFile) Path() string
- func (f *StaticFile) Permalink() string
- func (f *StaticFile) PostDate() time.Time
- func (f *StaticFile) Published() bool
- func (f *StaticFile) SourcePath() string
- func (p *StaticFile) Static() bool
- func (f *StaticFile) String() string
- func (f *StaticFile) Tags() []string
- func (d *StaticFile) ToLiquid() interface{}
- func (p *StaticFile) Write(w io.Writer) error
Constants ¶
View Source
const DefaultPermalinkPattern = "/:path:output_ext"
DefaultPermalinkPattern is the default permalink pattern for pages that aren't in a collection
Variables ¶
View Source
var PermalinkStyles = map[string]string{
"date": "/:categories/:year/:month/:day/:title.html",
"pretty": "/:categories/:year/:month/:day/:title/",
"ordinal": "/:categories/:year/:y_day/:title.html",
"none": "/:categories/:title.html",
}
PermalinkStyles defines built-in styles from https://jekyllrb.com/docs/permalinks/#builtinpermalinkstyles
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document interface { // Paths Permalink() string // relative URL path SourcePath() string OutputExt() string // Output Published() bool Static() bool Write(io.Writer) error Categories() []string Tags() []string }
A Document is a Jekyll post, page, or file.
type Page ¶
type Page interface { Document // Content asks a page to compute its content. // This has the side effect of causing the content to subsequently appear in the drop. Content() ([]byte, error) SetContent(content []byte) FrontMatter() map[string]interface{} // PostDate returns the date computed from the filename or frontmatter. // It is an uncaught error to call this on a page that is not a Post. // TODO Should posts have their own interface? PostDate() time.Time }
Page is a document with frontmatter.
type Site ¶
type Site interface { Config() *config.Config RenderingPipeline() pipelines.PipelineInterface OutputExt(pathname string) string }
Site is the interface that the site provides to a page.
type StaticFile ¶
type StaticFile struct {
// contains filtered or unexported fields
}
StaticFile is a static file.
func (*StaticFile) Categories ¶
func (f *StaticFile) Categories() []string
Categories is in the File interface
func (*StaticFile) MarshalYAML ¶
func (f *StaticFile) MarshalYAML() (interface{}, error)
MarshalYAML is part of the yaml.Marshaler interface The variables subcommand uses this.
func (*StaticFile) PostDate ¶
PostDate is part of the Page interface. FIXME move this back to Page interface, or re-work this entirely.
func (*StaticFile) SourcePath ¶
func (f *StaticFile) SourcePath() string
func (*StaticFile) ToLiquid ¶
func (d *StaticFile) ToLiquid() interface{}
ToLiquid is part of the liquid.Drop interface.
Click to show internal directories.
Click to hide internal directories.