summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2023-02-18 22:47:35 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-03-02 16:32:32 +0100
commit36ce3a4a9d3933772085991c8636915ffd5cb3af (patch)
treee7eaf3e0ea689b227fe012eab7c0f16205d6cd8c /hugolib
parent17e60b77e15664ba37f5c0b911cf70c36d496d80 (diff)
Correct typos in Go comments
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/content_map.go4
-rw-r--r--hugolib/filesystems/basefs.go2
-rw-r--r--hugolib/hugo_sites.go2
-rw-r--r--hugolib/pagecollections.go4
-rw-r--r--hugolib/site.go4
5 files changed, 8 insertions, 8 deletions
diff --git a/hugolib/content_map.go b/hugolib/content_map.go
index 6849998b6..bf77e7f1b 100644
--- a/hugolib/content_map.go
+++ b/hugolib/content_map.go
@@ -43,7 +43,7 @@ import (
//
// For bundled pages (/mybundle/index.md), we use the folder name.
//
-// An exmple of a full page key would be "/blog/__hb_page1__hl_"
+// An example of a full page key would be "/blog/__hb_page1__hl_"
//
// Bundled resources are stored in the `resources` having their path prefixed
// with the bundle they belong to, e.g.
@@ -317,7 +317,7 @@ type contentMap struct {
// There are currently two cases where this is used:
// 1. Short name lookups in ref/relRef, e.g. using only "mypage.md" without a path.
// 2. Links resolved from a remounted content directory. These are restricted to the same module.
- // Both of the above cases can result in ambigous lookup errors.
+ // Both of the above cases can result in ambiguous lookup errors.
pageReverseIndex *contentTreeReverseIndex
// Section nodes.
diff --git a/hugolib/filesystems/basefs.go b/hugolib/filesystems/basefs.go
index 5a98be47e..377428325 100644
--- a/hugolib/filesystems/basefs.go
+++ b/hugolib/filesystems/basefs.go
@@ -297,7 +297,7 @@ func (s SourceFilesystems) StaticFs(lang string) afero.Fs {
// StatResource looks for a resource in these filesystems in order: static, assets and finally content.
// If found in any of them, it returns FileInfo and the relevant filesystem.
// Any non herrors.IsNotExist error will be returned.
-// An herrors.IsNotExist error wil be returned only if all filesystems return such an error.
+// An herrors.IsNotExist error will be returned only if all filesystems return such an error.
// Note that if we only wanted to find the file, we could create a composite Afero fs,
// but we also need to know which filesystem root it lives in.
func (s SourceFilesystems) StatResource(lang, filename string) (fi os.FileInfo, fs afero.Fs, err error) {
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
index 65cc23971..edb925de5 100644
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -723,7 +723,7 @@ type BuildCfg struct {
// shouldRender is used in the Fast Render Mode to determine if we need to re-render
// a Page: If it is recently visited (the home pages will always be in this set) or changed.
// Note that a page does not have to have a content page / file.
-// For regular builds, this will allways return true.
+// For regular builds, this will always return true.
// TODO(bep) rename/work this.
func (cfg *BuildCfg) shouldRender(p *pageState) bool {
if p == nil {
diff --git a/hugolib/pagecollections.go b/hugolib/pagecollections.go
index 811fb6025..0d901d6b2 100644
--- a/hugolib/pagecollections.go
+++ b/hugolib/pagecollections.go
@@ -209,7 +209,7 @@ func (c *PageCollections) getSectionOrPage(ref string) (*contentNode, string) {
return m.getPage(s, name), name
}
-// For Ref/Reflink and .Site.GetPage do simple name lookups for the potentially ambigous myarticle.md and /myarticle.md,
+// For Ref/Reflink and .Site.GetPage do simple name lookups for the potentially ambiguous myarticle.md and /myarticle.md,
// but not when we get ./myarticle*, section/myarticle.
func shouldDoSimpleLookup(ref string) bool {
if ref[0] == '.' {
@@ -325,7 +325,7 @@ func (c *PageCollections) getContentNode(context page.Page, isReflink bool, ref
return nil, nil
}
- // Ref/relref supports this potentially ambigous lookup.
+ // Ref/relref supports this potentially ambiguous lookup.
return getByName(path.Base(name))
}
diff --git a/hugolib/site.go b/hugolib/site.go
index 45b4643f0..1b0c48cbc 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -428,7 +428,7 @@ func newSite(cfg deps.DepsCfg) (*Site, error) {
delete(disabledKinds, "taxonomyTerm")
} else if disabledKinds[page.KindTaxonomy] && !disabledKinds[page.KindTerm] {
- // This is a potentially ambigous situation. It may be correct.
+ // This is a potentially ambiguous situation. It may be correct.
ignorableLogger.Errorsf(constants.ErrIDAmbigousDisableKindTaxonomy, `You have the value 'taxonomy' in the disabledKinds list. In Hugo 0.73.0 we fixed these to be what most people expect (taxonomy and term).
But this also means that your site configuration may not do what you expect. If it is correct, you can suppress this message by following the instructions below.`)
}
@@ -487,7 +487,7 @@ But this also means that your site configuration may not do what you expect. If
siteOutputs[page.KindTerm] = v2
delete(siteOutputs, "taxonomyTerm")
} else if hasTaxonomy && !hasTerm {
- // This is a potentially ambigous situation. It may be correct.
+ // This is a potentially ambiguous situation. It may be correct.
ignorableLogger.Errorsf(constants.ErrIDAmbigousOutputKindTaxonomy, `You have configured output formats for 'taxonomy' in your site configuration. In Hugo 0.73.0 we fixed these to be what most people expect (taxonomy and term).
But this also means that your site configuration may not do what you expect. If it is correct, you can suppress this message by following the instructions below.`)
}