// Setting this will make this output format control the value of
// .Permalink and .RelPermalink for a rendered Page.
// If not set, these values will point to the main (first) output format
- // configured. That is probably the behaviour you want in most situations,
+ // configured. That is probably the behavior you want in most situations,
// as you probably don't want to link back to the RSS version of a page, as an
// example. AMP would, however, be a good example of an output format where this
- // behaviour is wanted.
+ // behavior is wanted.
Permalinkable bool `json:"permalinkable"`
// Setting this to a non-zero value will be used as the first sort criteria.
"github.com/gohugoio/hugo/common/paths"
)
-// ResourcePaths holds path information for a resouce.
+// ResourcePaths holds path information for a resource.
// All directories in here have Unix-style slashes, with leading slash, but no trailing slash.
// Empty directories are represented with an empty string.
type ResourcePaths struct {
"github.com/gohugoio/hugo/resources/kinds"
)
-// PermalinkExpander holds permalin mappings per section.
+// PermalinkExpander holds permalink mappings per section.
type PermalinkExpander struct {
// knownPermalinkAttributes maps :tags in a permalink specification to a
// function which, given a page and the tag, returns the resulting string
// [permalinks]
// key = '...'
- // To sucessfully be backward compatible, "default" patterns need to be set for both page and term
+ // To successfully be backward compatible, "default" patterns need to be set for both page and term
permalinksConfig[kinds.KindPage][k] = v
permalinksConfig[kinds.KindTerm][k] = v
"github.com/gohugoio/hugo/navigation"
)
-// Site represents a site. There can be multople sites in a multilingual setup.
+// Site represents a site. There can be multiple sites in a multilingual setup.
type Site interface {
// Returns the Language configured for this Site.
Language() *langs.Language
// Set when its known up front, else it's resolved from the target filename.
MediaType media.Type
- // Used to track depenencies (e.g. imports). May be nil if that's of no concern.
+ // Used to track dependencies (e.g. imports). May be nil if that's of no concern.
DependencyManager identity.Manager
// A shared identity for this resource and all its clones.
*SpecCommon
}
-// The parts of Spec that's comoon for all sites.
+// The parts of Spec that's common for all sites.
type SpecCommon struct {
incr identity.Incrementer
ResourceCache *ResourceCache
return seq, nil
}
-// Shuffle returns list l in a randomised order.
+// Shuffle returns list l in a randomized order.
func (ns *Namespace) Shuffle(l any) (any, error) {
if l == nil {
return nil, errors.New("both count and seq must be provided")
return _fmt.Sprint(args...)
}
-// Printf returns string representation of args formatted with the layouut in format.
+// Printf returns string representation of args formatted with the layout in format.
func (ns *Namespace) Printf(format string, args ...any) string {
return _fmt.Sprintf(format, args...)
}
return ""
}
-// Warnmf is epxermimental and subject to change at any time.
+// Warnmf is experimental and subject to change at any time.
func (ns *Namespace) Warnmf(m any, format string, args ...any) string {
return ns.logmf(ns.logger.Warn(), m, format, args...)
}
-// Errormf is epxermimental and subject to change at any time.
+// Errormf is experimental and subject to change at any time.
func (ns *Namespace) Errormf(m any, format string, args ...any) string {
return ns.logmf(ns.logger.Error(), m, format, args...)
}
return v2, v1, ok2
}
-// This roundabout way of doing it is needed to get both pipeline behaviour and options as arguments.
+// This roundabout way of doing it is needed to get both pipeline behavior and options as arguments.
func ResolveArgs(args []any) (resources.ResourceTransformer, map[string]any, error) {
if len(args) == 0 {
return nil, nil, errors.New("no Resource provided in transformation")
r.FileInfo = fi
// If fi is a dir, we watch the files inside that directory (not recursively).
- // This matches the behaviour of fsnotity.
+ // This matches the behavior of fsnotity.
if fi.IsDir() {
f, err := os.Open(filename)
if err != nil {
trap exit SIGINT
# I use "run tests on save" in my editor.
-# Unfortantly, changes to text files does not trigger this. Hence this workaround.
+# Unfortunately, changes to text files does not trigger this. Hence this workaround.
while true; do find testscripts -type f -name "*.txt" | entr -pd touch main_test.go; done
\ No newline at end of file