Documentation ¶
Index ¶
- Constants
- type Collection
- func (c *Collection) AbsDir() string
- func (c *Collection) IsPostsCollection() bool
- func (c *Collection) Output() bool
- func (c *Collection) Pages() []Page
- func (c *Collection) PathPrefix() string
- func (c *Collection) PermalinkPattern() string
- func (c *Collection) ReadPages() error
- func (c *Collection) Render() error
- func (c *Collection) String() string
- func (c *Collection) ToLiquid() interface{}
- type Page
- type Site
Constants ¶
const DefaultCollectionPermalinkPattern = "/:collection/:path:output_ext"
DefaultCollectionPermalinkPattern is the default permalink pattern for pages in the posts collection
const DefaultPostsCollectionPermalinkPattern = "/:categories/:year/:month/:day/:title.html"
DefaultPostsCollectionPermalinkPattern is the default collection permalink pattern
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { Name string Metadata map[string]interface{} // contains filtered or unexported fields }
Collection is a Jekyll collection https://jekyllrb.com/docs/collections/.
func New ¶
func New(s Site, name string, metadata map[string]interface{}) *Collection
New creates a new Collection
func (*Collection) AbsDir ¶
func (c *Collection) AbsDir() string
AbsDir returns the absolute path to the collection directory.
func (*Collection) IsPostsCollection ¶
func (c *Collection) IsPostsCollection() bool
IsPostsCollection returns true if the collection is the special "posts" collection.
func (*Collection) Output ¶
func (c *Collection) Output() bool
Output returns a bool indicating whether files in this collection should be written.
func (*Collection) Pages ¶
func (c *Collection) Pages() []Page
Pages in the Post collection are ordered by date.
func (*Collection) PathPrefix ¶
func (c *Collection) PathPrefix() string
PathPrefix returns the collection's directory prefix, e.g. "_posts/"
func (*Collection) PermalinkPattern ¶
func (c *Collection) PermalinkPattern() string
PermalinkPattern returns the default permalink pattern for this collection.
func (*Collection) ReadPages ¶
func (c *Collection) ReadPages() error
ReadPages scans the file system for collection pages, and adds them to c.Pages.
func (*Collection) Render ¶ added in v0.2.4
func (c *Collection) Render() error
Render renders the collection's pages.
func (*Collection) String ¶ added in v0.2.5
func (c *Collection) String() string
func (*Collection) ToLiquid ¶
func (c *Collection) ToLiquid() interface{}
ToLiquid returns the value of the collection in the template "collections" array.