Documentation ¶
Index ¶
- func AddTrailingSlash(path string) string
- func BytesToHTML(b []byte) template.HTML
- type ContentHub
- func (ch *ContentHub) CollectPages() error
- func (ch *ContentHub) PreparePages() error
- func (ch *ContentHub) RenderPages(td contenthub.TemplateDescriptor, cb func(info contenthub.PageInfo) error) error
- func (ch ContentHub) RenderString(ctx context.Context, args ...any) (goTmpl.HTML, error)
- func (ch *ContentHub) SetTemplateExecutor(exec contenthub.TemplateExecutor)
- type ContentMap
- type ContentSpec
- type ContentTree
- type ContentTrees
- type PageCollections
- type PageMap
- type Title
- type TitleStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTrailingSlash ¶
AddTrailingSlash adds a trailing Unix styled slash (/) if not already there.
func BytesToHTML ¶
BytesToHTML converts bytes to type template.HTML.
Types ¶
type ContentHub ¶
type ContentHub struct { Fs contenthub.Fs // ExecTemplate handling. TemplateExecutor contenthub.TemplateExecutor *PageCollections *Title // contains filtered or unexported fields }
func (*ContentHub) CollectPages ¶
func (ch *ContentHub) CollectPages() error
func (*ContentHub) PreparePages ¶
func (ch *ContentHub) PreparePages() error
func (*ContentHub) RenderPages ¶
func (ch *ContentHub) RenderPages(td contenthub.TemplateDescriptor, cb func(info contenthub.PageInfo) error) error
func (ContentHub) RenderString ¶
func (*ContentHub) SetTemplateExecutor ¶
func (ch *ContentHub) SetTemplateExecutor(exec contenthub.TemplateExecutor)
type ContentMap ¶
type ContentMap struct { // View of regular pages, sections, and taxonomies. PageTrees ContentTrees // View of pages, sections, taxonomies, and resources. BundleTrees ContentTrees // Stores page bundles keyed by its path's directory or the base filename, // e.g. "blog/post.md" => "/blog/post", "blog/post/index.md" => "/blog/post" // These are the "regular pages" and all of them are bundles. Pages *ContentTree // Section nodes. Sections *ContentTree }
func (*ContentMap) AddFilesBundle ¶
func (m *ContentMap) AddFilesBundle(header fsVO.FileMetaInfo) error
func (*ContentMap) CreateMissingNodes ¶
func (m *ContentMap) CreateMissingNodes() error
type ContentSpec ¶
type ContentSpec struct {
Converters contenthub.ConverterRegistry
}
func (*ContentSpec) GetContentConvertProvider ¶
func (c *ContentSpec) GetContentConvertProvider(name string) contenthub.ConverterProvider
func (*ContentSpec) ResolveMarkup ¶
func (c *ContentSpec) ResolveMarkup(in string) string
type ContentTree ¶
type ContentTrees ¶
type ContentTrees []*ContentTree
func (ContentTrees) Walk ¶
func (c ContentTrees) Walk(fn contentTreeNodeCallback)
type PageCollections ¶
type PageCollections struct {
PageMap *PageMap
}
PageCollections contains the page collections for a site.
type PageMap ¶
type PageMap struct { *ContentMap *ContentSpec }
func (*PageMap) AssemblePages ¶
func (*PageMap) AssembleSections ¶
Click to show internal directories.
Click to hide internal directories.