Versions in this module Expand all Collapse all v0 v0.123.13 Mar 12, 2024 v0.123.12 Mar 12, 2024 v0.123.11 Mar 12, 2024 v0.123.10 Mar 12, 2024 Changes in this version + var DefaultPageSort = func(p1, p2 Page) bool + var NilPage *nopPage + var NopCPageContentRenderer = struct{ ... } + var NopContentRenderer ContentRenderer = new(nopContentRenderer) + var NopPage Page = new(nopPage) + func CheckCascadePattern(logger loggers.Logger, m PageMatcher) + func Clear() error + func DecodeCascade(logger loggers.Logger, in any) (map[PageMatcher]maps.Params, error) + func DecodeCascadeConfig(logger loggers.Logger, in any) (...) + func DecodePermalinksConfig(m map[string]any) (map[string]map[string]string, error) + func MarshalPageToJSON(p Page) ([]byte, error) + func ResolvePagerSize(conf config.AllProvider, options ...any) (int, error) + func SortByDefault(pages Pages) + func SortByLanguage(pages Pages) + type AlternativeOutputFormatsProvider interface + AlternativeOutputFormats func() OutputFormats + type Author struct + DisplayName string + Email string + FamilyName string + GivenName string + Image string + LongBio string + ShortBio string + Social AuthorSocial + Thumbnail string + type AuthorList map[string]Author + type AuthorProvider interface + Author func() Author + Authors func() AuthorList + type AuthorSocial map[string]string + type ChildCareProvider interface + Pages func() Pages + RegularPages func() Pages + RegularPagesRecursive func() Pages + Resources func() resource.Resources + type ContentProvider interface + Content func(context.Context) (any, error) + FuzzyWordCount func(context.Context) int + Len func(context.Context) int + Plain func(context.Context) string + PlainWords func(context.Context) []string + ReadingTime func(context.Context) int + Summary func(context.Context) template.HTML + Truncated func(context.Context) bool + WordCount func(context.Context) int + type ContentRenderer interface + ParseAndRenderContent func(ctx context.Context, content []byte, enableTOC bool) (converter.ResultRender, error) + ParseContent func(ctx context.Context, content []byte) (converter.ResultParse, bool, error) + RenderContent func(ctx context.Context, content []byte, doc any) (converter.ResultRender, bool, error) + type Data map[string]any + func (d Data) Pages() Pages + type FileProvider interface + File func() *source.File + type GetPageProvider interface + GetPage func(ref string) (Page, error) + type GitInfoProvider interface + CodeOwners func() []string + GitInfo func() source.GitInfo + type InSectionPositioner interface + NextInSection func() Page + PrevInSection func() Page + type InternalDependencies interface + GetRelatedDocsHandler func() *RelatedDocsHandler + type LazyContentProvider struct + func NewLazyContentProvider(f func() (OutputFormatContentProvider, error)) *LazyContentProvider + func (lcp *LazyContentProvider) Content(ctx context.Context) (any, error) + func (lcp *LazyContentProvider) Fragments(ctx context.Context) *tableofcontents.Fragments + func (lcp *LazyContentProvider) FuzzyWordCount(ctx context.Context) int + func (lcp *LazyContentProvider) Len(ctx context.Context) int + func (lcp *LazyContentProvider) ParseAndRenderContent(ctx context.Context, content []byte, renderTOC bool) (converter.ResultRender, error) + func (lcp *LazyContentProvider) ParseContent(ctx context.Context, content []byte) (converter.ResultParse, bool, error) + func (lcp *LazyContentProvider) Plain(ctx context.Context) string + func (lcp *LazyContentProvider) PlainWords(ctx context.Context) []string + func (lcp *LazyContentProvider) ReadingTime(ctx context.Context) int + func (lcp *LazyContentProvider) Render(ctx context.Context, layout ...string) (template.HTML, error) + func (lcp *LazyContentProvider) RenderContent(ctx context.Context, content []byte, doc any) (converter.ResultRender, bool, error) + func (lcp *LazyContentProvider) RenderString(ctx context.Context, args ...any) (template.HTML, error) + func (lcp *LazyContentProvider) Reset() + func (lcp *LazyContentProvider) Summary(ctx context.Context) template.HTML + func (lcp *LazyContentProvider) TableOfContents(ctx context.Context) template.HTML + func (lcp *LazyContentProvider) Truncated(ctx context.Context) bool + func (lcp *LazyContentProvider) WordCount(ctx context.Context) int + type OrderedTaxonomy []OrderedTaxonomyEntry + func (t OrderedTaxonomy) Reverse() OrderedTaxonomy + type OrderedTaxonomyEntry struct + Name string + func (ie OrderedTaxonomyEntry) Count() int + func (ie OrderedTaxonomyEntry) Pages() Pages + func (ie OrderedTaxonomyEntry) Term() string + type OutputFormat struct + Format output.Format + Rel string + func NewOutputFormat(relPermalink, permalink string, isCanonical bool, f output.Format) OutputFormat + func (o OutputFormat) MediaType() media.Type + func (o OutputFormat) Name() string + func (o OutputFormat) Permalink() string + func (o OutputFormat) RelPermalink() string + type OutputFormatContentProvider interface + type OutputFormatPageContentProvider interface + type OutputFormats []OutputFormat + func (o OutputFormats) Get(name string) *OutputFormat + type OutputFormatsProvider interface + OutputFormats func() OutputFormats + type Page interface + type PageFragment interface + type PageGenealogist interface + Related func(ctx context.Context, opts any) (Pages, error) + RelatedIndices func(ctx context.Context, doc related.Document, indices ...any) (Pages, error) + RelatedTo func(ctx context.Context, args ...types.KeyValues) (Pages, error) + type PageGroup struct + Key any + func (p PageGroup) ProbablyEq(other any) bool + func (p PageGroup) Slice(in any) (any, error) + type PageMatcher struct + Environment string + Kind string + Lang string + Path string + func (m PageMatcher) Matches(p Page) bool + type PageMatcherParamsConfig struct + Params maps.Params + Target PageMatcher + type PageMetaProvider interface + Aliases func() []string + BundleType func() string + Description func() string + Draft func() bool + IsHome func() bool + IsNode func() bool + IsPage func() bool + IsSection func() bool + Keywords func() []string + Kind func() string + Lang func() string + Layout func() string + LinkTitle func() string + Param func(key any) (any, error) + Path func() string + PathInfo func() *paths.Path + Section func() string + Sitemap func() config.SitemapConfig + Slug func() string + Type func() string + Weight func() int + type PageProvider interface + Page func() Page + type PageRenderProvider interface + Render func(ctx context.Context, layout ...string) (template.HTML, error) + RenderString func(ctx context.Context, args ...any) (template.HTML, error) + type PageWithContext struct + Ctx context.Context + func (p PageWithContext) Content() (any, error) + func (p PageWithContext) FuzzyWordCount() int + func (p PageWithContext) Len() int + func (p PageWithContext) Plain() string + func (p PageWithContext) PlainWords() []string + func (p PageWithContext) ReadingTime() int + func (p PageWithContext) Summary() template.HTML + func (p PageWithContext) Truncated() bool + func (p PageWithContext) WordCount() int + type PageWithoutContent interface + GetTerms func(taxonomy string) Pages + HeadingsFiltered func(context.Context) tableofcontents.Headings + Store func() *maps.Scratch + type Pager struct + func (p *Pager) First() *Pager + func (p *Pager) HasNext() bool + func (p *Pager) HasPrev() bool + func (p *Pager) Last() *Pager + func (p *Pager) Next() *Pager + func (p *Pager) NumberOfElements() int + func (p *Pager) PageGroups() PagesGroup + func (p *Pager) PageNumber() int + func (p *Pager) Pages() Pages + func (p *Pager) Prev() *Pager + func (p *Pager) URL() string + func (p Pager) String() string + type Pages []Page + func ToPages(seq any) (Pages, error) + func (p Pages) ByDate() Pages + func (p Pages) ByExpiryDate() Pages + func (p Pages) ByLanguage() Pages + func (p Pages) ByLastmod() Pages + func (p Pages) ByLength(ctx context.Context) Pages + func (p Pages) ByLinkTitle() Pages + func (p Pages) ByParam(paramsKey any) Pages + func (p Pages) ByPublishDate() Pages + func (p Pages) ByTitle() Pages + func (p Pages) ByWeight() Pages + func (p Pages) Group(key any, in any) (any, error) + func (p Pages) GroupBy(ctx context.Context, key string, order ...string) (PagesGroup, error) + func (p Pages) GroupByDate(format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByExpiryDate(format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByLastmod(format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByParam(key string, order ...string) (PagesGroup, error) + func (p Pages) GroupByParamDate(key string, format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByPublishDate(format string, order ...string) (PagesGroup, error) + func (p Pages) Len() int + func (p Pages) Limit(n int) Pages + func (p Pages) Next(cur Page) Page + func (p Pages) Prev(cur Page) Page + func (p Pages) Related(ctx context.Context, optsv any) (Pages, error) + func (p Pages) RelatedIndices(ctx context.Context, doc related.Document, indices ...any) (Pages, error) + func (p Pages) RelatedTo(ctx context.Context, args ...types.KeyValues) (Pages, error) + func (p Pages) Reverse() Pages + func (p1 Pages) MergeByLanguage(p2 Pages) Pages + func (p1 Pages) MergeByLanguageInterface(in any) (any, error) + func (pages Pages) ProbablyEq(other any) bool + func (pages Pages) ToResources() resource.Resources + func (ps Pages) String() string + type PagesFactory func() Pages + type PagesGroup []PageGroup + func ToPagesGroup(seq any) (PagesGroup, bool, error) + func (p PagesGroup) Reverse() PagesGroup + func (psg PagesGroup) Len() int + func (psg PagesGroup) ProbablyEq(other any) bool + type Paginator struct + func Paginate(td TargetPathDescriptor, seq any, pagerSize int) (*Paginator, error) + func (p *Paginator) PageSize() int + func (p *Paginator) Pagers() pagers + func (p *Paginator) TotalNumberOfElements() int + func (p *Paginator) TotalPages() int + type PaginatorNotSupportedFunc func() error + func (f PaginatorNotSupportedFunc) Paginate(pages any, options ...any) (*Pager, error) + func (f PaginatorNotSupportedFunc) Paginator(options ...any) (*Pager, error) + type PaginatorProvider interface + Paginate func(pages any, options ...any) (*Pager, error) + Paginator func(options ...any) (*Pager, error) + type PermalinkExpander struct + func NewPermalinkExpander(urlize func(uri string) string, patterns map[string]map[string]string) (PermalinkExpander, error) + func (l PermalinkExpander) Expand(key string, p Page) (string, error) + type Positioner interface + Next func() Page + NextPage func() Page + Prev func() Page + PrevPage func() Page + type RawContentProvider interface + RawContent func() string + type RefProvider interface + Ref func(argsm map[string]any) (string, error) + RefFrom func(argsm map[string]any, source any) (string, error) + RelRef func(argsm map[string]any) (string, error) + RelRefFrom func(argsm map[string]any, source any) (string, error) + type RelatedDocsHandler struct + func NewRelatedDocsHandler(cfg related.Config) *RelatedDocsHandler + func (s *RelatedDocsHandler) Clone() *RelatedDocsHandler + type RelatedKeywordsProvider interface + RelatedKeywords func(cfg related.IndexConfig) ([]related.Keyword, error) + type RenderShortcodesProvider interface + RenderShortcodes func(context.Context) (template.HTML, error) + type ShortcodeInfoProvider interface + HasShortcode func(name string) bool + type Site interface + AllPages func() Pages + Author func() map[string]interface{} + Authors func() AuthorList + BaseURL func() string + BuildDrafts func() bool + Config func() SiteConfig + Copyright func() string + Current func() Site + Data func() map[string]any + DisqusShortname func() string + GetPage func(ref ...string) (Page, error) + GoogleAnalytics func() string + Home func() Page + Hugo func() hugo.HugoInfo + IsMultiLingual func() bool + IsServer func() bool + Language func() *langs.Language + LanguageCode func() string + LanguagePrefix func() string + Languages func() langs.Languages + LastChange func() time.Time + Lastmod func() time.Time + MainSections func() []string + Menus func() navigation.Menus + Pages func() Pages + Param func(key any) (any, error) + Params func() maps.Params + RSSLink func() template.URL + RegularPages func() Pages + Sections func() Pages + ServerPort func() int + Sites func() Sites + Social func() map[string]string + Taxonomies func() TaxonomyList + Title func() string + func NewDummyHugoSite(conf config.AllProvider) Site + func WrapSite(s Site) Site + type SiteConfig struct + Privacy privacy.Config + Services services.Config + type Sites []Site + func (s Sites) First() Site + type SitesProvider interface + Site func() Site + Sites func() Sites + type TableOfContentsProvider interface + Fragments func(context.Context) *tableofcontents.Fragments + TableOfContents func(context.Context) template.HTML + type TargetPathDescriptor struct + Addends string + BaseName string + ExpandedPermalink string + ForcePrefix bool + Kind string + Path *paths.Path + PathSpec *helpers.PathSpec + PrefixFilePath string + PrefixLink string + Section *paths.Path + Type output.Format + URL string + UglyURLs bool + type TargetPaths struct + Link string + SubResourceBaseLink string + SubResourceBaseTarget string + TargetFilename string + func CreateTargetPaths(d TargetPathDescriptor) (tp TargetPaths) + func (p TargetPaths) PermalinkForOutputFormat(s *helpers.PathSpec, f output.Format) string + func (p TargetPaths) RelPermalink(s *helpers.PathSpec) string + type Taxonomy map[string]WeightedPages + func (i Taxonomy) Alphabetical() OrderedTaxonomy + func (i Taxonomy) ByCount() OrderedTaxonomy + func (i Taxonomy) Count(key string) int + func (i Taxonomy) Get(key string) WeightedPages + func (i Taxonomy) TaxonomyArray() OrderedTaxonomy + type TaxonomyList map[string]Taxonomy + func (tl TaxonomyList) String() string + type TranslationsProvider interface + AllTranslations func() Pages + IsTranslated func() bool + Translations func() Pages + type TreeProvider interface + Ancestors func() Pages + CurrentSection func() Page + FirstSection func() Page + InSection func(other any) bool + IsAncestor func(other any) bool + IsDescendant func(other any) bool + Page func() Page + Parent func() Page + Sections func() Pages + SectionsEntries func() []string + SectionsPath func() string + type WeightedPage struct + Weight int + func NewWeightedPage(weight int, p Page, owner Page) WeightedPage + func (p WeightedPage) Slice(in any) (any, error) + func (w WeightedPage) String() string + type WeightedPages []WeightedPage + func (p WeightedPages) Page() Page + func (wp WeightedPages) Count() int + func (wp WeightedPages) Len() int + func (wp WeightedPages) Less(i, j int) bool + func (wp WeightedPages) Next(cur Page) Page + func (wp WeightedPages) Pages() Pages + func (wp WeightedPages) Prev(cur Page) Page + func (wp WeightedPages) Sort() + func (wp WeightedPages) Swap(i, j int)