Documentation ¶
Index ¶
- Constants
- Variables
- type Document
- type FrontMatter
- type Page
- type PageEmbed
- type Site
- type StaticFile
- func (p *StaticFile) IsStatic() bool
- func (f *StaticFile) OutputExt() string
- func (f *StaticFile) PostDate() time.Time
- func (f *StaticFile) Published() bool
- func (f *StaticFile) Reload() error
- func (f *StaticFile) Source() string
- func (f *StaticFile) String() string
- func (d *StaticFile) ToLiquid() interface{}
- func (f *StaticFile) URL() string
- func (p *StaticFile) Write(w io.Writer) error
Constants ¶
const DefaultPermalinkPattern = "/:path:output_ext"
DefaultPermalinkPattern is the default permalink pattern for pages that aren't in a collection
Variables ¶
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 URL() string // relative to site base Source() string OutputExt() string // Output Published() bool IsStatic() bool Write(io.Writer) error Reload() error }
A Document is a Jekyll post, page, or file.
type FrontMatter ¶ added in v0.2.7
type FrontMatter = frontmatter.FrontMatter
FrontMatter is from the frontmatter package.
type Page ¶
type Page interface { Document // Render asks a page to compute its content. // This has the side effect of causing the content to subsequently appear in the drop. Render() error SetContent(string) FrontMatter() FrontMatter // 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 IsPost() bool Categories() []string Tags() []string }
Page is a document with frontmatter.
type PageEmbed ¶ added in v0.2.0
type PageEmbed struct {
Path string
}
PageEmbed can be embedded to give defaults for the Page interface.
type Site ¶
type Site interface { Config() *config.Config RelativePath(string) string RendererManager() renderers.Renderers }
Site is the interface that the site provides to a page.
type StaticFile ¶
type StaticFile struct {
// contains filtered or unexported fields
}
A StaticFile is a static file. (Lint made me say this.)
func (*StaticFile) IsStatic ¶ added in v0.2.7
func (p *StaticFile) IsStatic() bool
IsStatic is in the File interface.
func (*StaticFile) PostDate ¶
PostDate is part of the Page interface. FIXME move this back to Page interface, or re-work this entirely.
func (*StaticFile) ToLiquid ¶
func (d *StaticFile) ToLiquid() interface{}
ToLiquid is part of the liquid.Drop interface.