Documentation ¶
Index ¶
- type BuildInfo
- type BuildState
- type PagesFromDataTemplateContext
- type PagesFromTemplate
- func (b *PagesFromTemplate) AddChange(id identity.Identity)
- func (p PagesFromTemplate) CloneForGoTmpl(fi hugofs.FileMetaInfo) *PagesFromTemplate
- func (p PagesFromTemplate) CloneForSite(s page.Site) *PagesFromTemplate
- func (p *PagesFromTemplate) Execute(ctx context.Context) (BuildInfo, error)
- func (p *PagesFromTemplate) GetDependencyManagerForScope(scope int) identity.Manager
- func (b *PagesFromTemplate) MarkStale()
- func (b *PagesFromTemplate) StaleVersion() uint32
- type PagesFromTemplateDeps
- type PagesFromTemplateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildState ¶
type BuildState struct { StaleVersion uint32 EnableAllLanguages bool // Paths deleted in the current build. DeletedPaths []string // Changed identities in the current build. ChangedIdentities []identity.Identity NumPagesAdded uint64 NumResourcesAdded uint64 // contains filtered or unexported fields }
func (*BuildState) PrepareNextBuild ¶
func (b *BuildState) PrepareNextBuild()
type PagesFromDataTemplateContext ¶
type PagesFromDataTemplateContext interface { // AddPage adds a new page to the site. // The first return value will always be an empty string. AddPage(any) (string, error) // AddResource adds a new resource to the site. // The first return value will always be an empty string. AddResource(any) (string, error) // The site to which the pages will be added. Site() page.Site // The same template may be executed multiple times for multiple languages. // The Store can be used to store state between these invocations. Store() *maps.Scratch // By default, the template will be executed for the language // defined by the _content.gotmpl file (e.g. its mount definition). // This method can be used to activate the template for all languages. // The return value will always be an empty string. EnableAllLanguages() string }
type PagesFromTemplate ¶
type PagesFromTemplate struct { PagesFromTemplateOptions PagesFromTemplateDeps // contains filtered or unexported fields }
func NewPagesFromTemplate ¶
func NewPagesFromTemplate(opts PagesFromTemplateOptions) *PagesFromTemplate
func (*PagesFromTemplate) AddChange ¶
func (b *PagesFromTemplate) AddChange(id identity.Identity)
func (PagesFromTemplate) CloneForGoTmpl ¶
func (p PagesFromTemplate) CloneForGoTmpl(fi hugofs.FileMetaInfo) *PagesFromTemplate
func (PagesFromTemplate) CloneForSite ¶
func (p PagesFromTemplate) CloneForSite(s page.Site) *PagesFromTemplate
func (*PagesFromTemplate) Execute ¶
func (p *PagesFromTemplate) Execute(ctx context.Context) (BuildInfo, error)
func (*PagesFromTemplate) GetDependencyManagerForScope ¶
func (p *PagesFromTemplate) GetDependencyManagerForScope(scope int) identity.Manager
func (*PagesFromTemplate) MarkStale ¶
func (b *PagesFromTemplate) MarkStale()
func (*PagesFromTemplate) StaleVersion ¶
func (b *PagesFromTemplate) StaleVersion() uint32
type PagesFromTemplateDeps ¶
type PagesFromTemplateDeps struct { TmplFinder tpl.TemplateParseFinder TmplExec tpl.TemplateExecutor }
type PagesFromTemplateOptions ¶
type PagesFromTemplateOptions struct { Site page.Site DepsFromSite func(page.Site) PagesFromTemplateDeps DependencyManager identity.Manager Watching bool HandlePage func(pt *PagesFromTemplate, p *pagemeta.PageConfig) error HandleResource func(pt *PagesFromTemplate, p *pagemeta.ResourceConfig) error GoTmplFi hugofs.FileMetaInfo }
Click to show internal directories.
Click to hide internal directories.