Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blog ¶
type Blog struct { sync.RWMutex Url string Title string Description string Logo string Cover string AssetPath string PostCount int64 PostsPerPage int64 ActiveTheme string }
Blog: settings that are used for template execution
type Helper ¶
type Helper struct { Name string Arguments []Helper Unescaped bool Position int Block []byte Children []Helper Function func(*Helper, *RequestData) []byte BodyHelper *Helper }
Helpers are created during parsing of the theme (template files). Helpers should never be altered during template execution (Helpers are shared across all requests).
type RequestData ¶
type RequestData struct { Posts []Post Blog *Blog CurrentTag *Tag CurrentIndexPage int CurrentPostIndex int CurrentTagIndex int CurrentHelperContext int // 0 = index, 1 = post, 2 = tag, 3 = author, 4 = navigation - used by block helpers CurrentTemplate int // 0 = index, 1 = post, 2 = tag, 3 = author - never changes during execution. Used by funcs like body_classFunc etc to output the correct class ContentForHelpers []Helper // contentFor helpers that are attached to the currently rendering helper CurrentPath string // path of the the url of this request }
RequestData: used for template/helper execution. Contains data specific to the incoming request.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.