diff --git a/hugofs/stacktracer_fs.go b/hugofs/stacktracer_fs.go index d4db164ca..d3769f903 100644 --- a/hugofs/stacktracer_fs.go +++ b/hugofs/stacktracer_fs.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/afero" ) -// Make sure we don't accidently use this in the real Hugo. +// Make sure we don't accidentally use this in the real Hugo. var _ types.DevMarker = (*stacktracerFs)(nil) // NewStacktracerFs wraps the given fs printing stack traces for file creates diff --git a/hugolib/page__content.go b/hugolib/page__content.go index 593c5b9a1..1919fb171 100644 --- a/hugolib/page__content.go +++ b/hugolib/page__content.go @@ -70,7 +70,7 @@ func (p pageContent) contentToRender(renderedShortcodes map[string]string) []byt } default: - panic(fmt.Sprintf("unkown item type %T", it)) + panic(fmt.Sprintf("unknown item type %T", it)) } } diff --git a/hugolib/page_test.go b/hugolib/page_test.go index 3a0a76c3d..05dacbe0a 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -560,7 +560,7 @@ func TestPageSummary(t *testing.T) { assertFunc := func(t *testing.T, ext string, pages page.Pages) { p := pages[0] checkPageTitle(t, p, "SimpleWithoutSummaryDelimiter") - // Source is not Asciidoctor- or RST-compatibile so don't test them + // Source is not Asciidoctor- or RST-compatible so don't test them if ext != "ad" && ext != "rst" { checkPageContent(t, p, normalizeExpected(ext, "

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\n\n

Additional text.

\n\n

Further text.

\n"), ext) checkPageSummary(t, p, normalizeExpected(ext, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Additional text."), ext) @@ -590,7 +590,7 @@ func TestPageWithSummaryParameter(t *testing.T) { p := pages[0] checkPageTitle(t, p, "SimpleWithSummaryParameter") checkPageContent(t, p, normalizeExpected(ext, "

Some text.

\n\n

Some more text.

\n"), ext) - // Summary is not Asciidoctor- or RST-compatibile so don't test them + // Summary is not Asciidoctor- or RST-compatible so don't test them if ext != "ad" && ext != "rst" { checkPageSummary(t, p, normalizeExpected(ext, "Page with summary parameter and a link"), ext) } diff --git a/modules/module.go b/modules/module.go index bba7657c5..f71911617 100644 --- a/modules/module.go +++ b/modules/module.go @@ -12,7 +12,7 @@ // limitations under the License. // Package modules provides a client that can be used to manage Hugo Components, -// what's refered to as Hugo Modules. Hugo Modules is built on top of Go Modules, +// what's referred to as Hugo Modules. Hugo Modules is built on top of Go Modules, // but also supports vendoring and components stored directly in the themes dir. package modules diff --git a/resources/page/page.go b/resources/page/page.go index e2c883a8e..00b449607 100644 --- a/resources/page/page.go +++ b/resources/page/page.go @@ -219,7 +219,7 @@ type PageWithoutContent interface { ChildCareProvider TreeProvider - // Horisontal navigation + // Horizontal navigation InSectionPositioner PageRenderProvider PaginatorProvider diff --git a/resources/resource.go b/resources/resource.go index 0aee4a052..92bcbd0fc 100644 --- a/resources/resource.go +++ b/resources/resource.go @@ -702,7 +702,7 @@ func (r *Spec) newGenericResourceWithBase( mediaType media.Type) *genericResource { if osFileInfo != nil && osFileInfo.IsDir() { - panic(fmt.Sprintf("dirs nto supported resource types: %v", osFileInfo)) + panic(fmt.Sprintf("dirs not supported resource types: %v", osFileInfo)) } // This value is used both to construct URLs and file paths, but start diff --git a/tpl/collections/merge_test.go b/tpl/collections/merge_test.go index 9e34a6e98..ca55107ac 100644 --- a/tpl/collections/merge_test.go +++ b/tpl/collections/merge_test.go @@ -61,7 +61,7 @@ func TestMerge(t *testing.T) { // Error cases. {"dst not a map", "not a map", nil, nil, true}, {"src not a map", simpleMap, "not a map", nil, true}, - {"diferent map typs", simpleMap, map[int]interface{}{32: "a"}, nil, true}, + {"different map types", simpleMap, map[int]interface{}{32: "a"}, nil, true}, {"all nil", nil, nil, nil, true}, } { diff --git a/tpl/tplimpl/shortcodes.go b/tpl/tplimpl/shortcodes.go index 92c25f108..b41725463 100644 --- a/tpl/tplimpl/shortcodes.go +++ b/tpl/tplimpl/shortcodes.go @@ -83,7 +83,7 @@ func (s *shortcodeTemplates) fromVariantsSlice(variants []string) (shortcodeVari return bestMatch, true } -// calculate a weight for two string slices of same lenght. +// calculate a weight for two string slices of same length. // higher value means "better match". func (s *shortcodeTemplates) compareVariants(a, b []string) int {