diff --git a/common/paths/pathparser.go b/common/paths/pathparser.go index 20f5ee30d..951501406 100644 --- a/common/paths/pathparser.go +++ b/common/paths/pathparser.go @@ -239,7 +239,7 @@ const ( // E.g. /blog/my-post.md PathTypeContentSingle - // All bewlow are bundled content files. + // All below are bundled content files. // Leaf bundles, e.g. /blog/my-post/index.md PathTypeLeaf @@ -313,7 +313,7 @@ func (p *Path) norm(s string) string { return s } -// IdentifierBase satifies identity.Identity. +// IdentifierBase satisfies identity.Identity. func (p *Path) IdentifierBase() string { return p.Base() } @@ -368,7 +368,7 @@ func (p *Path) Name() string { return p.s } -// Name returns the last element of path withhout any extension. +// Name returns the last element of path without any extension. func (p *Path) NameNoExt() string { if i := p.identifierIndex(0); i != -1 { return p.s[p.posContainerHigh : p.identifiers[i].Low-1] @@ -376,7 +376,7 @@ func (p *Path) NameNoExt() string { return p.s[p.posContainerHigh:] } -// Name returns the last element of path withhout any language identifier. +// Name returns the last element of path without any language identifier. func (p *Path) NameNoLang() string { i := p.identifierIndex(p.posIdentifierLanguage) if i == -1 { @@ -386,7 +386,7 @@ func (p *Path) NameNoLang() string { return p.s[p.posContainerHigh:p.identifiers[i].Low-1] + p.s[p.identifiers[i].High:] } -// BaseNameNoIdentifier returns the logcical base name for a resource without any idenifier (e.g. no extension). +// BaseNameNoIdentifier returns the logical base name for a resource without any identifier (e.g. no extension). // For bundles this will be the containing directory's name, e.g. "blog". func (p *Path) BaseNameNoIdentifier() string { if p.IsBundle() { @@ -395,7 +395,7 @@ func (p *Path) BaseNameNoIdentifier() string { return p.NameNoIdentifier() } -// NameNoIdentifier returns the last element of path withhout any identifier (e.g. no extension). +// NameNoIdentifier returns the last element of path without any identifier (e.g. no extension). func (p *Path) NameNoIdentifier() string { if len(p.identifiers) > 0 { return p.s[p.posContainerHigh : p.identifiers[len(p.identifiers)-1].Low-1] @@ -435,7 +435,7 @@ func (p *Path) PathNoIdentifier() string { return p.base(false, false) } -// PathRel returns the path relativeto the given owner. +// PathRel returns the path relative to the given owner. func (p *Path) PathRel(owner *Path) string { ob := owner.Base() if !strings.HasSuffix(ob, "/") { diff --git a/create/skeletons/theme/layouts/partials/terms.html b/create/skeletons/theme/layouts/partials/terms.html index 47cf6e41c..8a6ebec2a 100644 --- a/create/skeletons/theme/layouts/partials/terms.html +++ b/create/skeletons/theme/layouts/partials/terms.html @@ -2,7 +2,7 @@ For a given taxonomy, renders a list of terms assigned to the page. @context {page} page The current page. -@context {string} taxonomy The taxonony. +@context {string} taxonomy The taxonomy. @example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} */}} diff --git a/deps/deps.go b/deps/deps.go index 8778bff80..78a5330b7 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -361,7 +361,7 @@ type BuildState struct { mu sync.Mutex // protects state below. - // A set of ilenames in /public that + // A set of filenames in /public that // contains a post-processing prefix. filenamesWithPostPrefix map[string]bool } diff --git a/hugofs/dirsmerger.go b/hugofs/dirsmerger.go index 392353e27..9eedb5844 100644 --- a/hugofs/dirsmerger.go +++ b/hugofs/dirsmerger.go @@ -42,7 +42,7 @@ var LanguageDirsMerger overlayfs.DirsMerger = func(lofi, bofi []fs.DirEntry) []f // AppendDirsMerger merges two directories keeping all regular files // with the first slice as the base. -// Duplicate directories in the secnond slice will be ignored. +// Duplicate directories in the second slice will be ignored. // This strategy is used for the i18n and data fs where we need all entries. var AppendDirsMerger overlayfs.DirsMerger = func(lofi, bofi []fs.DirEntry) []fs.DirEntry { for _, fi1 := range bofi { diff --git a/hugofs/rootmapping_fs.go b/hugofs/rootmapping_fs.go index a30498668..c91403c79 100644 --- a/hugofs/rootmapping_fs.go +++ b/hugofs/rootmapping_fs.go @@ -822,7 +822,7 @@ func (f *rootMappingDir) ReadDir(count int) ([]iofs.DirEntry, error) { return f.fs.collectDirEntries(f.name) } -// Sentinal error to signal that a file is a directory. +// Sentinel error to signal that a file is a directory. var errIsDir = errors.New("isDir") func (f *rootMappingDir) Stat() (iofs.FileInfo, error) { diff --git a/identity/identity.go b/identity/identity.go index c799759df..f924f335c 100644 --- a/identity/identity.go +++ b/identity/identity.go @@ -355,7 +355,7 @@ func (im *identityManager) String() string { } func (im *identityManager) forEeachIdentity(fn func(id Identity) bool) bool { - // The absense of a lock here is debliberate. This is currently opnly used on server reloads + // The absence of a lock here is deliberate. This is currently only used on server reloads // in a single-threaded context. for id := range im.ids { if fn(id) { diff --git a/main_test.go b/main_test.go index 75f5ed949..9dd2734d2 100644 --- a/main_test.go +++ b/main_test.go @@ -134,7 +134,7 @@ var commonTestScriptsParam = testscript.Params{ fmt.Fprintf(ts.Stdout(), "%s %04o %s %s\n", fi.Mode(), fi.Mode().Perm(), fi.ModTime().Format(time.RFC3339Nano), fi.Name()) } }, - // append appends to a file with a leaading newline. + // append appends to a file with a leading newline. "append": func(ts *testscript.TestScript, neg bool, args []string) { if len(args) < 2 { ts.Fatalf("usage: append FILE TEXT") diff --git a/markup/goldmark/codeblocks/render.go b/markup/goldmark/codeblocks/render.go index 5f479bf23..67053640d 100644 --- a/markup/goldmark/codeblocks/render.go +++ b/markup/goldmark/codeblocks/render.go @@ -147,7 +147,7 @@ type codeBlockContext struct { ordinal int // This is only used in error situations and is expensive to create, - // to deleay creation until needed. + // to delay creation until needed. pos htext.Position posInit sync.Once createPos func() htext.Position diff --git a/markup/internal/attributes/attributes.go b/markup/internal/attributes/attributes.go index 4e81afe04..15bed7039 100644 --- a/markup/internal/attributes/attributes.go +++ b/markup/internal/attributes/attributes.go @@ -95,7 +95,7 @@ func New(astAttributes []ast.Attribute, ownerType AttributesOwnerType) *Attribut case []byte: // Note that we don't do any HTML escaping here. // We used to do that, but that changed in #9558. - // Noww it's up to the templates to decide. + // Now it's up to the templates to decide. vv = string(vvv) default: panic(fmt.Sprintf("not implemented: %T", vvv)) @@ -175,7 +175,7 @@ func (a *AttributesHolder) OptionsSlice() []Attribute { // RenderASTAttributes writes the AST attributes to the given as attributes to an HTML element. // This is used by the default HTML renderers, e.g. for headings etc. where no hook template could be found. -// This performs HTML esacaping of string attributes. +// This performs HTML escaping of string attributes. func RenderASTAttributes(w hugio.FlexiWriter, attributes ...ast.Attribute) { for _, attr := range attributes { diff --git a/modules/config.go b/modules/config.go index abb938ac0..2f1168d3a 100644 --- a/modules/config.go +++ b/modules/config.go @@ -270,7 +270,7 @@ type Config struct { // When enabled, we will pick the vendored module closest to the module // using it. - // The default behaviour is to pick the first. + // The default behavior is to pick the first. // Note that there can still be only one dependency of a given module path, // so once it is in use it cannot be redefined. VendorClosest bool diff --git a/releaser/releaser.go b/releaser/releaser.go index e50a3ba31..254bda5b3 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -29,7 +29,7 @@ import ( const commitPrefix = "releaser:" -// New initialises a ReleaseHandler. +// New initializes a ReleaseHandler. func New(skipPush, try bool, step int) (*ReleaseHandler, error) { if step < 1 || step > 2 { return nil, fmt.Errorf("step must be 1 or 2") diff --git a/resources/resource_transformers/tocss/dartsass/client.go b/resources/resource_transformers/tocss/dartsass/client.go index 4b8ca97eb..e6f5567e4 100644 --- a/resources/resource_transformers/tocss/dartsass/client.go +++ b/resources/resource_transformers/tocss/dartsass/client.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package dartsass integrates with the Dass Sass Embedded protocol to transpile +// Package dartsass integrates with the Dart Sass Embedded protocol to transpile // SCSS/SASS. package dartsass diff --git a/resources/resource_transformers/tocss/dartsass/transform.go b/resources/resource_transformers/tocss/dartsass/transform.go index 17f16a688..52d24da7d 100644 --- a/resources/resource_transformers/tocss/dartsass/transform.go +++ b/resources/resource_transformers/tocss/dartsass/transform.go @@ -181,7 +181,7 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) { } } - // Not found, let Dart Dass handle it + // Not found, let Dart Sass handle it return "", nil }