valueobject

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 40 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KindPage = "page"

	KindHome    = "home"
	KindSection = "section"

	// Note that before Hugo 0.73 these were confusingly named
	// taxonomy (now: term)
	// taxonomyTerm (now: taxonomy)
	KindTaxonomy = "taxonomy"
	KindTerm     = "term"

	// The following are (currently) temporary nodes,
	// i.e. nodes we create just to render in isolation.
	KindRSS          = "rss"
	KindSitemap      = "sitemap"
	KindSitemapIndex = "sitemapindex"
	KindRobotsTXT    = "robotstxt"
	KindStatus404    = "404"
)
View Source
const (
	TypeBasic     = "basic"
	TypeFragments = "fragments"
)
View Source
const ShortcodePlaceholderPrefix = "HAHAHUGOSHORTCODE"

Variables

View Source
var (
	// This is all the kinds we can expect to find in .Site.Pages.
	AllKindsInPages []string
	// This is all the kinds, including the temporary ones.
	AllKinds []string
)
View Source
var DefaultTocConfig = TocConfig{
	StartLevel: 2,
	EndLevel:   3,
	Ordered:    false,
}

DefaultTocConfig is the default ToC configuration.

View Source
var MDProvider contenthub.ProviderProvider = provide{}

MDProvider is the package entry point.

View Source
var (
	NilPage *nopPage
)
View Source
var TocShortcodePlaceholder = CreateShortcodePlaceholder("TOC", 0, 0)
View Source
var ZeroShortcode = prerenderedShortcode{}

Functions

func AddFileInfoToError

func AddFileInfoToError(err error, fi fs.FileMetaInfo, fs afero.Fs) error

AddFileInfoToError adds file info to the given error.

func CheckCascadePattern

func CheckCascadePattern(m PageMatcher)

func CreateShortcodePlaceholder

func CreateShortcodePlaceholder(sid string, id uint64, ordinal int) string

func DecodeCascadeConfig

func DecodeCascadeConfig(in any) (map[PageMatcher]maps.Params, error)

func GetKindAny

func GetKindAny(s string) string

GetKindAny gets the page kind given a string, empty if not found.

func GetKindMain

func GetKindMain(s string) string

GetKindMain gets the page kind given a string, empty if not found. Note that this will not return any temporary kinds (e.g. robotstxt).

func GetParam

func GetParam(p maps.Params, key string, stringToLower bool) any

func GetParamToLower

func GetParamToLower(m maps.Params, key string) any

func GetPluralCount

func GetPluralCount(v any) any

func IsBranch

func IsBranch(kind string) bool

IsBranch returns whether the given kind is a branch node.

func IsDeprecatedAndReplacedWith

func IsDeprecatedAndReplacedWith(s string) string

IsDeprecatedAndReplacedWith returns the new kind if the given kind is deprecated.

func NewPageInfo

func NewPageInfo(name, kind, dir string, sections []string, buf *bytes.Buffer) contenthub.PageInfo

func NewZeroFile

func NewZeroFile() contenthub.File

func Param

func Param(r contenthub.ResourceParamsProvider, fallback maps.Params, key any) (any, error)

func PosFromInput

func PosFromInput(filename string, input []byte, offset int) text.Position

func PutPagePathBuilder

func PutPagePathBuilder(b *PagePathBuilder)

func SetupDefaultContentTypes

func SetupDefaultContentTypes()

func SortByDefault

func SortByDefault(pages contenthub.Pages)

SortByDefault sorts pages by the default sort.

func SortByLanguage

func SortByLanguage(pages contenthub.Pages)

func SortByWeight

func SortByWeight(pages contenthub.Pages)

SortByWeight sorts pages by weight.

func UniqueStringsReuse

func UniqueStringsReuse(s []string) []string

UniqueStringsReuse returns a slice with any duplicates removed. It will modify the input slice.

Types

type BundleType

type BundleType int
const (
	// BundleTypeFile A generic resource, e.g. a JSON file.
	BundleTypeFile BundleType = iota

	// BundleTypeContentResource All below are content files.
	// A resource of a content type with front matter.
	// A single file but not leaf
	BundleTypeContentResource

	// BundleTypeContentSingle E.g. /blog/my-post.md
	BundleTypeContentSingle

	// BundleTypeLeaf Leaf bundles, e.g. /blog/my-post/index.md
	BundleTypeLeaf

	// BundleTypeBranch Branch bundles, e.g. /blog/_index.md
	BundleTypeBranch
)

func (BundleType) IsBranchBundle

func (b BundleType) IsBranchBundle() bool

func (BundleType) IsBundle

func (b BundleType) IsBundle() bool

func (BundleType) IsContent

func (b BundleType) IsContent() bool

IsContent returns true if the path is a content file (e.g. mypost.md). Note that this will also return true for content files in a bundle.

func (BundleType) IsContentResource

func (b BundleType) IsContentResource() bool

func (BundleType) IsLeafBundle

func (b BundleType) IsLeafBundle() bool

type Cascade

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

func NewCascade

func NewCascade(cas any) (*Cascade, error)

type ContentSummary

type ContentSummary struct {
	Content             template.HTML
	Summary             template.HTML
	SummaryTruncated    bool
	TableOfContentsHTML template.HTML

	WordCount   int
	ReadingTime int

	MarkdownResult markdown.Result
}

func NewEmptyContentSummary

func NewEmptyContentSummary() ContentSummary

func (*ContentSummary) ExtractSummary

func (c *ContentSummary) ExtractSummary(input []byte, mt media.Type)

func (*ContentSummary) IsSummaryEmpty

func (c *ContentSummary) IsSummaryEmpty() bool

type ContentTypes

type ContentTypes struct {
	HTML             media.Type
	Markdown         media.Type
	AsciiDoc         media.Type
	Pandoc           media.Type
	ReStructuredText media.Type
	EmacsOrgMode     media.Type
	// contains filtered or unexported fields
}

ContentTypes holds the media types that are considered content in Hugo.

var DefaultContentTypes ContentTypes

func (ContentTypes) FromTypes

func (t ContentTypes) FromTypes(types media.Types) ContentTypes

FromTypes creates a new ContentTypes updated with the values from the given Types.

func (ContentTypes) IsContentFile

func (t ContentTypes) IsContentFile(filename string) bool

IsContentFile returns whether the given filename is a content file.

func (ContentTypes) IsContentSuffix

func (t ContentTypes) IsContentSuffix(suffix string) bool

func (ContentTypes) IsHTMLSuffix

func (t ContentTypes) IsHTMLSuffix(suffix string) bool

IsHTMLSuffix returns whether the given suffix is a HTML media type.

func (ContentTypes) IsIndexContentFile

func (t ContentTypes) IsIndexContentFile(filename string) bool

IsIndexContentFile returns whether the given filename is an index content file.

func (ContentTypes) Types

func (t ContentTypes) Types() media.Types

Types is a slice of media types.

type ConverterProvider

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

func (ConverterProvider) Name

func (n ConverterProvider) Name() string

func (ConverterProvider) New

type ConverterRegistry

type ConverterRegistry struct {
	// Maps name (md, markdown, goldmark etc.) to a converter provider.
	// Note that this is also used for aliasing, so the same converter
	// may be registered multiple times.
	// All names are lower case.
	Converters map[string]contenthub.ConverterProvider
}

func (*ConverterRegistry) Get

type File

type File struct {
	fs.FileMetaInfo

	BundleType
	// contains filtered or unexported fields
}

File describes a source file.

func NewFileInfo

func NewFileInfo(fi fs.FileMetaInfo) (*File, error)

func (*File) BaseFileName

func (fi *File) BaseFileName() string

BaseFileName returns a file's name without extension (e.g. "page.sv").

func (*File) ContentBaseName

func (fi *File) ContentBaseName() string

ContentBaseName is a either TranslationBaseName or name of containing folder if file is a bundle.

func (*File) Dir

func (fi *File) Dir() string

Dir gets the name of the directory that contains this file. The directory is relative to the content root.

func (*File) Ext

func (fi *File) Ext() string

Ext returns a file's extension without the leading period (e.g. "md").

func (*File) FileInfo

func (fi *File) FileInfo() fs.FileMetaInfo

FileInfo returns a file's underlying os.FileInfo.

func (*File) Filename

func (fi *File) Filename() string

Filename returns a file's absolute path and filename on disk.

func (*File) IsZero

func (fi *File) IsZero() bool

func (*File) LogicalName

func (fi *File) LogicalName() string

LogicalName returns a file's name and extension (e.g. "page.sv.md").

func (*File) Open

func (fi *File) Open() (io.ReadSeekCloser, error)

Open implements ReadableFile.

func (*File) Opener

func (fi *File) Opener() io.OpenReadSeekCloser

func (*File) PageFile

func (fi *File) PageFile() contenthub.File

func (*File) Path

func (fi *File) Path() string

func (*File) Paths

func (fi *File) Paths() *paths.Path

func (*File) RelPath

func (fi *File) RelPath() string

RelPath Paths gets the relative path including file name and extension. The directory is relative to the content root.

func (*File) Section

func (fi *File) Section() string

Section returns a file's section.

func (*File) ShiftToResource

func (fi *File) ShiftToResource()

func (*File) String

func (fi *File) String() string

func (*File) TranslationBaseName

func (fi *File) TranslationBaseName() string

TranslationBaseName returns a file's translation base name without the language segment (e.g. "page").

func (*File) Type

func (fi *File) Type() string

func (*File) UniqueID

func (fi *File) UniqueID() string

UniqueID returns a file's unique, MD5 hash identifier.

type FileManager

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

func NewFsManager

func NewFsManager(fis []fs.FileMetaInfo) *FileManager

func (*FileManager) GetLeaf

func (f *FileManager) GetLeaf() *File

type FragmentKeyword

type FragmentKeyword string

FragmentKeyword represents a document fragment.

func (FragmentKeyword) String

func (f FragmentKeyword) String() string

type FrontMatter

type FrontMatter struct {
	*Cascade

	Path   string
	Lang   string
	Kind   string
	Title  string
	Weight int

	Date time.Time

	Terms map[string][]string

	Params maps.Params
}

func NewFrontMatter

func NewFrontMatter() *FrontMatter

type FrontMatterParser

type FrontMatterParser struct {
	Params      maps.Params
	LangSvc     contenthub.LangService
	TaxonomySvc contenthub.TaxonomyService
}

func (*FrontMatterParser) Parse

func (b *FrontMatterParser) Parse() (*FrontMatter, error)

type HtmlSummary

type HtmlSummary struct {
	SummaryLowHigh types.LowHigh[string]
	SummaryEndTag  types.LowHigh[string]
	WrapperStart   types.LowHigh[string]
	WrapperEnd     types.LowHigh[string]
	Divider        types.LowHigh[string]
	// contains filtered or unexported fields
}

func (*HtmlSummary) Content

func (s *HtmlSummary) Content() string

func (*HtmlSummary) ContentWithoutSummary

func (s *HtmlSummary) ContentWithoutSummary() string

func (*HtmlSummary) Summary

func (s *HtmlSummary) Summary() string

func (*HtmlSummary) Truncated

func (s *HtmlSummary) Truncated() bool

func (*HtmlSummary) Value

func (s *HtmlSummary) Value(l types.LowHigh[string]) string

type Identity

type Identity struct {
	Id uint64

	Lang    string
	LangIdx int
}

func (Identity) ID

func (i Identity) ID() int

func (Identity) IdentifierBase

func (i Identity) IdentifierBase() string

func (Identity) PageIdentity

func (i Identity) PageIdentity() contenthub.PageIdentity

func (Identity) PageLanguage

func (i Identity) PageLanguage() string

func (Identity) PageLanguageIndex

func (i Identity) PageLanguageIndex() int

type IndexConfig

type IndexConfig struct {
	// The index name. This directly maps to a field or Param name.
	IndexName string

	// The index type.
	IndexType string

	// Enable to apply a type specific filter to the results.
	// This is currently only used for the "fragments" type.
	IndexApplyFilter bool

	// Contextual pattern used to convert the Param value into a string.
	// Currently only used for dates. Can be used to, say, bump posts in the same
	// time frame when searching for related documents.
	// For dates it follows Go's time.Format patterns, i.e.
	// "2006" for YYYY and "200601" for YYYYMM.
	IndexPattern string

	// This field's weight when doing multi-index searches. Higher is "better".
	IndexWeight int

	// A percentage (0-100) used to remove common keywords from the index.
	// As an example, setting this to 50 will remove all keywords that are
	// used in more than 50% of the documents in the index.
	IndexCardinalityThreshold int

	// Will lower case all string values in and queries tothis index.
	// May get better accurate results, but at a slight performance cost.
	IndexToLower bool
}

IndexConfig configures an index.

func (IndexConfig) ApplyFilter

func (cfg IndexConfig) ApplyFilter() bool

func (IndexConfig) CardinalityThreshold

func (cfg IndexConfig) CardinalityThreshold() int

func (IndexConfig) Name

func (cfg IndexConfig) Name() string

func (IndexConfig) Pattern

func (cfg IndexConfig) Pattern() string

func (IndexConfig) ToKeywords

func (cfg IndexConfig) ToKeywords(v any) ([]contenthub.Keyword, error)

ToKeywords returns a Keyword slice of the given input.

func (IndexConfig) ToLower

func (cfg IndexConfig) ToLower() bool

func (IndexConfig) Type

func (cfg IndexConfig) Type() string

func (IndexConfig) Weight

func (cfg IndexConfig) Weight() int

type IntCount

type IntCount int

IntCount wraps the Count method.

func (IntCount) Count

func (c IntCount) Count() int

type ItemHandler

type ItemHandler func(item pageparser.Item) error

type IterHandler

type IterHandler func(item pageparser.Item, iter *pageparser.Iterator) error

type LayoutDescriptor

type LayoutDescriptor struct {
	Type    string
	Section string

	// E.g. "page", but also used for the _markup render kinds, e.g. "render-images".
	Kind string

	// Comma-separated list of kind variants, e.g. "go,json" as variants which would find "render-codeblock-go.html"
	KindVariants string

	Lang   string
	Layout string
	// LayoutOverride indicates what we should only look for the above layout.
	LayoutOverride bool

	RenderingHook bool
	Baseof        bool

	FormatName string
	Extension  string
}

LayoutDescriptor describes how a layout should be chosen. This is typically built from a Page.

type LayoutHandler

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

LayoutHandler calculates the layout template to use to render a given output type.

func NewLayoutHandler

func NewLayoutHandler() *LayoutHandler

NewLayoutHandler creates a new LayoutHandler.

func (*LayoutHandler) For

func (l *LayoutHandler) For(d LayoutDescriptor) ([]string, error)

For returns a layout for the given LayoutDescriptor and options. Layouts are rendered and cached internally.

type LayoutLooker

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

func NewLayoutLooker

func NewLayoutLooker(names []string, bnames []string) *LayoutLooker

func (*LayoutLooker) BaseNames

func (l *LayoutLooker) BaseNames() []string

func (*LayoutLooker) Names

func (l *LayoutLooker) Names() []string

type PageContentReplacement

type PageContentReplacement struct {
	Val []byte

	Source pageparser.Item
}

type PageGroup

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

func (*PageGroup) Append

func (p *PageGroup) Append(page contenthub.Page) contenthub.Pages

func (*PageGroup) Key

func (p *PageGroup) Key() string

func (*PageGroup) Pages

func (p *PageGroup) Pages() contenthub.Pages

type PageMatcher

type PageMatcher struct {
	// A Glob pattern matching the content path below /content.
	// Expects Unix-styled slashes.
	// Note that this is the virtual path, so it starts at the mount root
	// with a leading "/".
	Path string

	// A Glob pattern matching the Page's Kind(s), e.g. "{home,section}"
	Kind string

	// A Glob pattern matching the Page's language, e.g. "{en,sv}".
	Lang string

	// A Glob pattern matching the Page's Environment, e.g. "{production,development}".
	Environment string
}

A PageMatcher can be used to match a Page with Glob patterns. Note that the pattern matching is case insensitive.

func (PageMatcher) Matches

func (m PageMatcher) Matches(p contenthub.Page) bool

Matches returns whether p matches this matcher.

type PageMatcherParamsConfig

type PageMatcherParamsConfig struct {
	// Apply Params to all Pages matching Target.
	Params maps.Params
	Target PageMatcher
}

type PagePathBuilder

type PagePathBuilder struct {

	// Builder state.
	IsUgly             bool
	BaseNameSameAsType bool // Remove it, only sitemap has same basename from both output format and descriptor
	NoSubResources     bool
	FullSuffix         string // File suffix including any ".".

	PrefixPath      string
	LinkUpperOffset int
	// contains filtered or unexported fields
}

PagePathBuilder When adding state here, remember to update putPagePathBuilder.

func GetPagePathBuilder

func GetPagePathBuilder(format output.Format) *PagePathBuilder

func (*PagePathBuilder) Add

func (p *PagePathBuilder) Add(el ...string)

func (*PagePathBuilder) ConcatLast

func (p *PagePathBuilder) ConcatLast(s string)

func (*PagePathBuilder) IsHtmlIndex

func (p *PagePathBuilder) IsHtmlIndex() bool

func (*PagePathBuilder) Last

func (p *PagePathBuilder) Last() string
func (p *PagePathBuilder) Link() string

func (*PagePathBuilder) LinkDir

func (p *PagePathBuilder) LinkDir() string

func (*PagePathBuilder) Path

func (p *PagePathBuilder) Path(upperOffset int) string

func (*PagePathBuilder) PathDir

func (p *PagePathBuilder) PathDir() string

func (*PagePathBuilder) PathDirBase

func (p *PagePathBuilder) PathDirBase() string

func (*PagePathBuilder) PathFile

func (p *PagePathBuilder) PathFile() string

func (*PagePathBuilder) Prepend

func (p *PagePathBuilder) Prepend(el ...string)

func (*PagePathBuilder) Sanitize

func (p *PagePathBuilder) Sanitize()

type Pager

type Pager struct {
	*Paginator
	// contains filtered or unexported fields
}

func (*Pager) First

func (p *Pager) First() contenthub.Pager

func (*Pager) HasNext

func (p *Pager) HasNext() bool

HasNext tests whether there are page(s) after the current.

func (*Pager) HasPrev

func (p *Pager) HasPrev() bool

HasPrev tests whether there are page(s) before the current.

func (*Pager) Last

func (p *Pager) Last() contenthub.Pager

func (*Pager) Next

func (p *Pager) Next() contenthub.Pager

Next returns the pager for the next page.

func (*Pager) NumberOfElements

func (p *Pager) NumberOfElements() int

func (*Pager) PageNumber

func (p *Pager) PageNumber() int

func (*Pager) Pages

func (p *Pager) Pages() contenthub.Pages

func (*Pager) Prev

func (p *Pager) Prev() contenthub.Pager

Prev returns the pager for the previous page.

func (*Pager) URL

func (p *Pager) URL() string

type Paginator

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

func NewPaginatorFromPageGroups

func NewPaginatorFromPageGroups(pageGroups contenthub.PageGroups, size int, base string) (*Paginator, error)

func NewPaginatorFromPages

func NewPaginatorFromPages(pages contenthub.Pages, size int, base string) (*Paginator, error)

func (*Paginator) Pagers

func (p *Paginator) Pagers() contenthub.Pagers

func (*Paginator) TotalPages

func (p *Paginator) TotalPages() int

type PaginatorEmpty

type PaginatorEmpty func() error

func (PaginatorEmpty) Current

func (f PaginatorEmpty) Current() contenthub.Pager

func (PaginatorEmpty) Paginate

func (f PaginatorEmpty) Paginate(groups contenthub.PageGroups) (contenthub.Pager, error)

func (PaginatorEmpty) Paginator

func (f PaginatorEmpty) Paginator() (contenthub.Pager, error)

func (PaginatorEmpty) SetCurrent

func (f PaginatorEmpty) SetCurrent(current contenthub.Pager)

type SearchOpts

type SearchOpts struct {
	// The Document to search for related content for.
	Document contenthub.Document

	// The keywords to search for.
	NamedSlices []types.KeyValues

	// The indices to search in.
	Indices []string

	// Fragments holds a a list of special keywords that is used
	// for indices configured as type "fragments".
	// This will match the fragment identifiers of the documents.
	Fragments []string
}

SearchOpts holds the options for a related search.

type Shortcode

type Shortcode struct {
	Name string

	Ordinal int

	Indentation string // indentation from source.

	Inner    []any // string or nested shortcode
	IsInline bool  // inline shortcode. Any inner will be a Go template.

	// If set, the rendered shortcode is sent as part of the surrounding content
	// to Goldmark and similar.
	// Before Hug0 0.55 we didn't send any shortcode output to the markup
	// renderer, and this flag told Hugo to process the {{ .Inner }} content
	// separately.
	// The old behavior can be had by starting your shortcode template with:
	//    {{ $_hugo_config := `{ "version": 1 }`}}
	DoMarkup bool

	IsClosing bool // whether a closing tag was provided

	Info   template.Info       // One of the output formats (arbitrary)
	Templs []template.Preparer // All output formats

	Params any // map or array

	Pos    int // the position in bytes in the source file
	Length int // the length in bytes in the source file

	// the placeholder in the source when passed to Goldmark etc.
	// This also identifies the rendered shortcode.
	Placeholder string
}

func (Shortcode) InsertPlaceholder

func (s Shortcode) InsertPlaceholder() bool

func (Shortcode) NeedsInner

func (s Shortcode) NeedsInner() bool

type ShortcodeParser

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

func NewShortcodeParser

func NewShortcodeParser(source []byte, pid uint64, tmplSvc contenthub.Template) *ShortcodeParser

func (*ShortcodeParser) ParseItem

func (s *ShortcodeParser) ParseItem(it pageparser.Item, pt *pageparser.Iterator) (*Shortcode, error)

type ShortcodeRenderFunc

type ShortcodeRenderFunc func(context.Context) ([]byte, bool, error)

func (ShortcodeRenderFunc) RenderShortcode

func (f ShortcodeRenderFunc) RenderShortcode(ctx context.Context) ([]byte, bool, error)

func (ShortcodeRenderFunc) RenderShortcodeString

func (f ShortcodeRenderFunc) RenderShortcodeString(ctx context.Context) (string, bool, error)

type ShortcodeRenderer

type ShortcodeRenderer interface {
	RenderShortcode(context.Context) ([]byte, bool, error)
	RenderShortcodeString(context.Context) (string, bool, error)
}

ShortcodeRenderer is typically used to delay rendering of inner shortcodes marked with placeholders in the content.

func NewPrerenderedShortcode

func NewPrerenderedShortcode(s string, hasVariants bool) ShortcodeRenderer

type SourceHandlers

type SourceHandlers interface {
	FrontMatterHandler() ItemHandler
	SummaryHandler() IterHandler
	BytesHandler() ItemHandler
	ShortcodeHandler() IterHandler
}

type SourceParseInfo

type SourceParseInfo struct {
	Source []byte

	// Items from the page parser.
	// These maps directly to the source
	ItemsStep1 pageparser.Items

	Handlers SourceHandlers
	// contains filtered or unexported fields
}

func NewSourceParseInfo

func NewSourceParseInfo(source []byte, handlers SourceHandlers) (*SourceParseInfo, error)

func (*SourceParseInfo) Handle

func (s *SourceParseInfo) Handle() error

func (*SourceParseInfo) IsEmpty

func (s *SourceParseInfo) IsEmpty() bool

func (*SourceParseInfo) Parse

func (s *SourceParseInfo) Parse() error

type StringKeyword

type StringKeyword string

StringKeyword is a string search keyword.

func (StringKeyword) String

func (s StringKeyword) String() string

type Target

type Target struct {
	Prefix string

	// Where to store the file on disk relative to the publish dir. OS slashes.
	FilePath string
	// The directory to write sub-resources of the above.
	SubResourceBaseTarget string

	Format output.Format
}

func (*Target) TargetFileBase

func (t *Target) TargetFileBase() string

func (*Target) TargetFilePath

func (t *Target) TargetFilePath() string

func (*Target) TargetFormat

func (t *Target) TargetFormat() output.Format

func (*Target) TargetPrefix

func (t *Target) TargetPrefix() string

func (*Target) TargetSubResourceDir

func (t *Target) TargetSubResourceDir() string

type TocConfig

type TocConfig struct {
	// Heading start level to include in the table of contents, starting
	// at h1 (inclusive).
	// <docsmeta>{ "identifiers": ["h1"] }</docsmeta>
	StartLevel int

	// Heading end level, inclusive, to include in the table of contents.
	// Default is 3, a value of -1 will include everything.
	EndLevel int

	// Whether to produce a ordered list or not.
	Ordered bool
}

type WhatChanged

type WhatChanged struct {
	IdentitySet identity.Identities
	// contains filtered or unexported fields
}

func (*WhatChanged) Add

func (w *WhatChanged) Add(ids ...identity.Identity)

func (*WhatChanged) Changes

func (w *WhatChanged) Changes() []identity.Identity

Jump to

Keyboard shortcuts

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