Documentation
¶
Overview ¶
Package model provides the verless domain entities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexPage ¶
IndexPage represents an overview page that is generated for each content sub-directory.
type Page ¶
type Page struct {
Route string
ID string
Title string
Author string
Date time.Time
Tags []string
Img string
Credit string
Description string
Content string
Related []*Page
Template string
// contains filtered or unexported fields
}
Page represents a sub-page of the website.
func (*Page) AddRelatedFQN ¶
AddRelatedFQN adds a new FullyQuallifiedName uri to the page.
func (*Page) RelatedFQNs ¶
RelatedFQNs returns all FullyQuallifiedName uris related to the page.
type Route ¶
Route represents an URL like /blog that contains multiple pages, an overview page (IndexPage) and child routes.
type Site ¶
Site represents the actual website. The site model is generated and populated with data and content during the website build.
Any build.Writer implementation is capable of rendering this model as a static website.
func (*Site) CreateRoute ¶
CreateRoute creates a new route in the route tree. Has to start with a slash representing the root route, e. g. /blog.
func (*Site) ResolveRoute ¶
ResolveRoute resolves and returns a route in the route tree. Has to start with a slash representing the root route.
func (*Site) WalkRoutes ¶
WalkRoutes traverses the site's route tree and invokes the given walkFn on each node. Use maxDepth = -1 to traverse all nodes.