Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderSimpleLiquid ¶
RenderSimpleLiquid renders a simple Liquid-style template by replacing {{ varName.field }} with the corresponding value from the item.
Types ¶
type PaginationContext ¶
type PaginationContext struct {
PageNumber int
TotalPages int
PreviousPage string
NextPage string
First string
Last string
Items []interface{}
}
PaginationContext holds pagination state for a single paginated page.
func Paginate ¶
func Paginate(data []interface{}, perPage int, basePath string, pathSegment string) ([]PaginationContext, []string, error)
Paginate splits data into pages and returns pagination contexts and output paths.
func PaginateWithTemplatePermalink ¶
func PaginateWithTemplatePermalink(data []interface{}, permalinkTemplate string, as string, renderer TemplateRenderer) ([]PaginationContext, []string, error)
PaginateWithTemplatePermalink generates one virtual page per data item, using the provided renderer callback to resolve the permalink template. This works with any template engine (Liquid, Go templates, etc.).
Click to show internal directories.
Click to hide internal directories.