Documentation
¶
Index ¶
- type ContentStore
- func (d *ContentStore) AllPages() map[string]content.Pages
- func (d *ContentStore) AllSections() map[string]content.Sections
- func (d *ContentStore) AllTaxonomies() map[string]content.Taxonomies
- func (d *ContentStore) GetPage(path string, lang string) *content.Page
- func (d *ContentStore) GetPageURL(path string, lang string) string
- func (d *ContentStore) GetSection(path string, lang string) *content.Section
- func (d *ContentStore) GetSectionURL(path string, lang string) string
- func (d *ContentStore) GetTaxonomy(name string, lang string) *content.Taxonomy
- func (d *ContentStore) GetTaxonomyTerm(taxonomyName string, name string, lang string) *content.TaxonomyTerm
- func (d *ContentStore) GetTaxonomyTermURL(taxonomyName string, name string, lang string) string
- func (d *ContentStore) GetTaxonomyTerms(name string, lang string) content.TaxonomyTerms
- func (d *ContentStore) GetTaxonomyURL(name string, lang string) string
- func (d *ContentStore) HiddenPages(lang string) content.Pages
- func (d *ContentStore) Pages(lang string) content.Pages
- func (d *ContentStore) Reset()
- func (d *ContentStore) Sections(lang string) content.Sections
- func (d *ContentStore) Taxonomies(lang string) content.Taxonomies
- type ContentTemplate
- func (t *ContentTemplate) Execute(vars map[string]any) (string, error)
- func (t *ContentTemplate) GetPage(path string, args ...string) *content.Page
- func (t *ContentTemplate) GetPageURL(path string, args ...string) string
- func (t *ContentTemplate) GetSection(path string, args ...string) *content.Section
- func (t *ContentTemplate) GetSectionURL(path string, args ...string) string
- func (t *ContentTemplate) GetTaxonomy(name string, args ...string) *content.Taxonomy
- func (t *ContentTemplate) GetTaxonomyTerm(taxonomyName string, name string, args ...string) *content.TaxonomyTerm
- func (t *ContentTemplate) GetTaxonomyTermURL(taxonomyName string, name string, args ...string) string
- func (t *ContentTemplate) GetTaxonomyURL(name string, args ...string) string
- func (t *ContentTemplate) HiddenPages(args ...string) content.Pages
- func (t *ContentTemplate) Pages(args ...string) content.Pages
- func (t *ContentTemplate) Sections(args ...string) content.Sections
- func (t *ContentTemplate) Taxonomies(args ...string) content.Taxonomies
- type ContentTemplateSet
- func (set *ContentTemplateSet) FromBytes(b []byte) (template.Template, error)
- func (set *ContentTemplateSet) FromFile(name string) (template.Template, error)
- func (set *ContentTemplateSet) FromString(b string) (template.Template, error)
- func (set *ContentTemplateSet) Lookup(names ...string) template.Template
- type Option
- type Set
- type Site
- type SiteOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentStore ¶
type ContentStore struct {
// contains filtered or unexported fields
}
func NewContentStore ¶
func NewContentStore() *ContentStore
func (*ContentStore) AllSections ¶
func (d *ContentStore) AllSections() map[string]content.Sections
func (*ContentStore) AllTaxonomies ¶
func (d *ContentStore) AllTaxonomies() map[string]content.Taxonomies
func (*ContentStore) GetPage ¶
func (d *ContentStore) GetPage(path string, lang string) *content.Page
func (*ContentStore) GetPageURL ¶
func (d *ContentStore) GetPageURL(path string, lang string) string
func (*ContentStore) GetSection ¶
func (d *ContentStore) GetSection(path string, lang string) *content.Section
func (*ContentStore) GetSectionURL ¶
func (d *ContentStore) GetSectionURL(path string, lang string) string
func (*ContentStore) GetTaxonomy ¶
func (d *ContentStore) GetTaxonomy(name string, lang string) *content.Taxonomy
func (*ContentStore) GetTaxonomyTerm ¶
func (d *ContentStore) GetTaxonomyTerm(taxonomyName string, name string, lang string) *content.TaxonomyTerm
func (*ContentStore) GetTaxonomyTermURL ¶
func (d *ContentStore) GetTaxonomyTermURL(taxonomyName string, name string, lang string) string
func (*ContentStore) GetTaxonomyTerms ¶
func (d *ContentStore) GetTaxonomyTerms(name string, lang string) content.TaxonomyTerms
func (*ContentStore) GetTaxonomyURL ¶
func (d *ContentStore) GetTaxonomyURL(name string, lang string) string
func (*ContentStore) HiddenPages ¶
func (d *ContentStore) HiddenPages(lang string) content.Pages
func (*ContentStore) Reset ¶
func (d *ContentStore) Reset()
func (*ContentStore) Taxonomies ¶
func (d *ContentStore) Taxonomies(lang string) content.Taxonomies
type ContentTemplate ¶
func (*ContentTemplate) Execute ¶
func (t *ContentTemplate) Execute(vars map[string]any) (string, error)
func (*ContentTemplate) GetPage ¶
func (t *ContentTemplate) GetPage(path string, args ...string) *content.Page
func (*ContentTemplate) GetPageURL ¶
func (t *ContentTemplate) GetPageURL(path string, args ...string) string
func (*ContentTemplate) GetSection ¶
func (t *ContentTemplate) GetSection(path string, args ...string) *content.Section
func (*ContentTemplate) GetSectionURL ¶
func (t *ContentTemplate) GetSectionURL(path string, args ...string) string
func (*ContentTemplate) GetTaxonomy ¶
func (t *ContentTemplate) GetTaxonomy(name string, args ...string) *content.Taxonomy
func (*ContentTemplate) GetTaxonomyTerm ¶
func (t *ContentTemplate) GetTaxonomyTerm(taxonomyName string, name string, args ...string) *content.TaxonomyTerm
func (*ContentTemplate) GetTaxonomyTermURL ¶
func (t *ContentTemplate) GetTaxonomyTermURL(taxonomyName string, name string, args ...string) string
func (*ContentTemplate) GetTaxonomyURL ¶
func (t *ContentTemplate) GetTaxonomyURL(name string, args ...string) string
func (*ContentTemplate) HiddenPages ¶
func (t *ContentTemplate) HiddenPages(args ...string) content.Pages
func (*ContentTemplate) Sections ¶
func (t *ContentTemplate) Sections(args ...string) content.Sections
func (*ContentTemplate) Taxonomies ¶
func (t *ContentTemplate) Taxonomies(args ...string) content.Taxonomies
type ContentTemplateSet ¶
type ContentTemplateSet struct {
template.TemplateSet
// contains filtered or unexported fields
}
func (*ContentTemplateSet) FromBytes ¶
func (set *ContentTemplateSet) FromBytes(b []byte) (template.Template, error)
func (*ContentTemplateSet) FromFile ¶
func (set *ContentTemplateSet) FromFile(name string) (template.Template, error)
func (*ContentTemplateSet) FromString ¶
func (set *ContentTemplateSet) FromString(b string) (template.Template, error)
type SiteOption ¶
type SiteOption func(*Site)
func WithHook ¶
func WithHook(h hook.Hook) SiteOption
func WithOption ¶
func WithOption(opt *Option) SiteOption
func WithWriter ¶
func WithWriter(w core.Writer) SiteOption
Click to show internal directories.
Click to hide internal directories.