Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collator ¶
func (*Collator) CompareStrings ¶
CompareStrings compares a and b. It returns -1 if a < b, 1 if a > b and 0 if a == b. Note that the Collator is not thread safe, so you may want to acquire a lock on it before calling this method.
type DestinationPublisher ¶
DestinationPublisher is the default and currently only publisher in Hugo. This publisher prepares and publishes an item to the defined destination, e.g. /public.
func (*DestinationPublisher) Publish ¶
func (p *DestinationPublisher) Publish(d site.Descriptor) error
Publish applies any relevant transformations and writes the file to its destination, e.g. /public.
type Language ¶
type Language struct { Config []site.LanguageConfig // contains filtered or unexported fields }
func (*Language) DefaultContentLanguage ¶
func (l *Language) DefaultContentLanguage() site.LanguageConfig
func (*Language) LanguagePrefix ¶
type Site ¶
type Site struct { // Output formats defined in site config per Page Kind, or some defaults // if not set. // Output formats defined in Page front matter will override these. OutputFormats map[string]valueobject.Formats // The output formats that we need to render this site in. This slice // will be fixed once set. // This will be the union of Site.Pages' outputFormats. // This slice will be sorted. RenderFormats valueobject.Formats // All the output formats and media types available for this site. // These values will be merged from the Hugo defaults, the site config and, // finally, the language settings. OutputFormatsConfig valueobject.Formats MediaTypesConfig media.Types Publisher site.Publisher ContentHub contenthub.ContentHub *URL *Language }
type URL ¶
type URL struct { Base string Canonical bool *valueobject.BaseURL }
func (*URL) BasePathNoSlash ¶
func (*URL) MakePath ¶
MakePath takes a string with any characters and replace it so the string could be used in a path. It does so by creating a Unicode-sanitized string, with the spaces replaced, whilst preserving the original casing of the string. E.g. Social Media -> Social-Media
func (*URL) MakePathSanitized ¶
MakePathSanitized creates a Unicode-sanitized string, with the spaces replaced