entity

package
v0.0.0-...-e8f5a11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTrailingSlash

func AddTrailingSlash(path string) string

AddTrailingSlash adds a trailing Unix styled slash (/) if not already there.

func BytesToHTML

func BytesToHTML(b []byte) template.HTML

BytesToHTML converts bytes to type template.HTML.

Types

type ContentHub

type ContentHub struct {
	Fs contenthub.Fs

	// ExecTemplate handling.
	TemplateExecutor contenthub.TemplateExecutor

	*PageCollections
	// 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

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 ContentTree struct {
	Name string
	*radixtree.Tree
}

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) Assemble

func (m *PageMap) Assemble() error

func (*PageMap) AssemblePages

func (m *PageMap) AssemblePages() error

func (*PageMap) AssembleSections

func (m *PageMap) AssembleSections() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL