site

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

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

func (d *ContentStore) AllPages() map[string]content.Pages

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

func (d *ContentStore) Pages(lang string) content.Pages

func (*ContentStore) Reset

func (d *ContentStore) Reset()

func (*ContentStore) Sections

func (d *ContentStore) Sections(lang string) content.Sections

func (*ContentStore) Taxonomies

func (d *ContentStore) Taxonomies(lang string) content.Taxonomies

type ContentTemplate

type ContentTemplate struct {
	template.Template
	// contains filtered or unexported fields
}

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

func (t *ContentTemplate) Pages(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)

func (*ContentTemplateSet) Lookup

func (set *ContentTemplateSet) Lookup(names ...string) template.Template

type Option

type Option struct {
	IncludeDrafts bool
}

type Set

type Set[T any] struct {
	// contains filtered or unexported fields
}

func (*Set[T]) Add

func (s *Set[T]) Add(key string, val T)

func (*Set[T]) Find

func (s *Set[T]) Find(key string) (T, bool)

func (*Set[T]) Iter

func (s *Set[T]) Iter() iter.Seq2[int, T]

func (*Set[T]) List

func (s *Set[T]) List() []T

type Site

type Site struct {
	// contains filtered or unexported fields
}

func New

func New(ctx *core.Context, opts ...SiteOption) (*Site, error)

func (*Site) Build

func (site *Site) Build(ctx context.Context) 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

Jump to

Keyboard shortcuts

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