entity

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language struct {
	Lang   string
	Weight int // for sort

	// If set per language, this tells Hugo that all content files without any
	// language indicator (e.g. my-page.en.md) is in this language.
	// This is usually a pathspec relative to the working dir, but it can be an
	// absolute directory reference. It is what we get.
	// For internal use.
	ContentDir string

	// Global config.
	// For internal use.
	Cfg config.Provider

	// Language specific config.
	// For internal use.
	LocalCfg config.Provider

	// Composite config.
	// For internal use.
	config.Provider
	// contains filtered or unexported fields
}

Language manages specific-language configuration.

func NewDefaultLanguage

func NewDefaultLanguage(cfg config.Provider) *Language

NewDefaultLanguage creates the default language for a config.Provider. If not otherwise specified the default is "en".

func NewLanguage

func NewLanguage(lang string, cfg config.Provider) *Language

NewLanguage creates a new language.

type Languages

type Languages []*Language

Languages is a sortable list of language.

func (Languages) Len

func (l Languages) Len() int

func (Languages) Less

func (l Languages) Less(i, j int) bool

func (Languages) Swap

func (l Languages) Swap(i, j int)

Jump to

Keyboard shortcuts

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