summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil@jankaritech.com>2020-12-16 16:56:32 +0545
committerGitHub <noreply@github.com>2020-12-16 12:11:32 +0100
commit04b89857e104ac7dcbf9fc65d8d4f1a1178123e6 (patch)
tree585bf761f0a1cfc69dffcd8afd22e94ca9da7c07
parent21fa1e86f2aa929fb0983a0cc3dc4e271ea1cc54 (diff)
all: Fix minor typos
-rwxr-xr-xbenchSite.sh2
-rw-r--r--cache/filecache/filecache.go2
-rw-r--r--cache/namedmemcache/named_cache.go2
-rw-r--r--codegen/methods.go2
-rw-r--r--common/hugio/readers.go2
-rw-r--r--config/commonConfig.go2
-rw-r--r--helpers/path.go10
-rw-r--r--helpers/pathspec.go2
-rw-r--r--helpers/url.go4
-rw-r--r--hugofs/filter_fs.go2
-rw-r--r--hugofs/nosymlink_test.go2
-rw-r--r--hugofs/rootmapping_fs_test.go2
-rw-r--r--hugolib/breaking_changes_test.go8
-rw-r--r--hugolib/content_map.go8
-rw-r--r--hugolib/content_map_page.go2
-rw-r--r--hugolib/embedded_shortcodes_test.go2
-rw-r--r--hugolib/hugo_modules_test.go6
-rw-r--r--hugolib/page.go6
-rw-r--r--hugolib/page__common.go2
-rw-r--r--hugolib/pagebundler_test.go4
-rw-r--r--hugolib/pagecollections.go4
-rw-r--r--hugolib/pages_capture.go2
-rw-r--r--hugolib/paths/paths.go2
-rw-r--r--hugolib/site.go6
-rw-r--r--hugolib/taxonomy_test.go8
-rw-r--r--hugolib/testhelpers_test.go4
-rw-r--r--langs/language.go2
-rw-r--r--markup/highlight/config.go2
-rw-r--r--media/mediaType.go4
-rw-r--r--minifiers/minifiers_test.go2
-rw-r--r--modules/collect.go2
-rw-r--r--parser/metadecoders/decoder.go2
-rw-r--r--parser/pageparser/pagelexer.go2
-rw-r--r--parser/pageparser/pagelexer_intro.go2
-rw-r--r--parser/pageparser/pagelexer_shortcode.go2
-rw-r--r--parser/pageparser/pageparser.go2
-rw-r--r--publisher/htmlElementsCollector.go2
-rw-r--r--releaser/releaser.go8
-rw-r--r--resources/image.go2
-rw-r--r--resources/image_cache.go2
-rw-r--r--resources/image_test.go2
-rw-r--r--resources/page/page_generate/generate_page_wrappers.go8
-rw-r--r--resources/page/page_outputformat.go2
-rw-r--r--resources/page/pagegroup.go4
-rw-r--r--resources/page/pages.go2
-rw-r--r--resources/page/pages_prev_next.go2
-rw-r--r--resources/page/pages_related.go2
-rw-r--r--resources/resource.go4
-rw-r--r--resources/resource_spec.go2
-rw-r--r--resources/resource_test.go2
-rw-r--r--resources/resource_transformers/babel/babel.go4
-rw-r--r--resources/resource_transformers/minifier/minify.go2
-rw-r--r--resources/resource_transformers/postcss/postcss.go4
-rw-r--r--resources/transform.go6
-rw-r--r--source/fileInfo.go4
-rw-r--r--tpl/collections/collections_test.go4
-rw-r--r--tpl/collections/merge.go2
-rw-r--r--tpl/collections/sort_test.go2
-rw-r--r--tpl/compare/compare.go2
-rw-r--r--tpl/internal/go_templates/texttemplate/hugo_template.go2
-rw-r--r--tpl/math/math.go2
-rw-r--r--tpl/strings/strings.go2
-rw-r--r--tpl/template.go2
-rw-r--r--tpl/tplimpl/embedded/generate/generate.go4
-rw-r--r--tpl/urls/urls.go2
-rw-r--r--transform/chain_test.go2
-rw-r--r--transform/urlreplacers/absurlreplacer_test.go38
67 files changed, 124 insertions, 124 deletions
diff --git a/benchSite.sh b/benchSite.sh
index 623086708..aae21231c 100755
--- a/benchSite.sh
+++ b/benchSite.sh
@@ -3,7 +3,7 @@
# allow user to override go executable by running as GOEXE=xxx make ...
GOEXE="${GOEXE-go}"
-# Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'.
+# Send in a regexp matching the benchmarks you want to run, i.e. './benchSite.sh "YAML"'.
# Note the quotes, which will be needed for more complex expressions.
# The above will run all variations, but only for front matter YAML.
diff --git a/cache/filecache/filecache.go b/cache/filecache/filecache.go
index c586f9a51..ffb0895b0 100644
--- a/cache/filecache/filecache.go
+++ b/cache/filecache/filecache.go
@@ -221,7 +221,7 @@ func (c *Cache) GetOrCreateBytes(id string, create func() ([]byte, error)) (Item
return info, b, nil
}
-// GetBytes gets the file content with the given id from the cahce, nil if none found.
+// GetBytes gets the file content with the given id from the cache, nil if none found.
func (c *Cache) GetBytes(id string) (ItemInfo, []byte, error) {
id = cleanID(id)
diff --git a/cache/namedmemcache/named_cache.go b/cache/namedmemcache/named_cache.go
index d67bcc28a..4e912bf58 100644
--- a/cache/namedmemcache/named_cache.go
+++ b/cache/namedmemcache/named_cache.go
@@ -54,7 +54,7 @@ func (c *Cache) Clear() {
// GetOrCreate tries to get the value with the given cache key, if not found
// create will be called and cached.
// This method is thread safe. It also guarantees that the create func for a given
-// key is invoced only once for this cache.
+// key is invoked only once for this cache.
func (c *Cache) GetOrCreate(key string, create func() (interface{}, error)) (interface{}, error) {
c.mu.RLock()
entry, found := c.cache[key]
diff --git a/codegen/methods.go b/codegen/methods.go
index 38477e333..23994c5f8 100644
--- a/codegen/methods.go
+++ b/codegen/methods.go
@@ -365,7 +365,7 @@ func (m Methods) Imports() []string {
}
// ToMarshalJSON creates a MarshalJSON method for these methods. Any method name
-// matchin any of the regexps in excludes will be ignored.
+// matching any of the regexps in excludes will be ignored.
func (m Methods) ToMarshalJSON(receiver, pkgPath string, excludes ...string) (string, []string) {
var sb strings.Builder
diff --git a/common/hugio/readers.go b/common/hugio/readers.go
index 8c901dd24..c93e05e86 100644
--- a/common/hugio/readers.go
+++ b/common/hugio/readers.go
@@ -32,7 +32,7 @@ type ReadSeekCloser interface {
}
// ReadSeekerNoOpCloser implements ReadSeekCloser by doing nothing in Close.
-// TODO(bep) rename this and simila to ReadSeekerNopCloser, naming used in stdlib, which kind of makes sense.
+// TODO(bep) rename this and similar to ReadSeekerNopCloser, naming used in stdlib, which kind of makes sense.
type ReadSeekerNoOpCloser struct {
ReadSeeker
}
diff --git a/config/commonConfig.go b/config/commonConfig.go
index 260ebe73e..d0d24f8ff 100644
--- a/config/commonConfig.go
+++ b/config/commonConfig.go
@@ -34,7 +34,7 @@ var DefaultBuild = Build{
WriteStats: false,
}
-// Build holds some build related condfiguration.
+// Build holds some build related configuration.
type Build struct {
UseResourceCacheWhen string // never, fallback, always. Default is fallback
diff --git a/helpers/path.go b/helpers/path.go
index abc73d081..17a513cec 100644
--- a/helpers/path.go
+++ b/helpers/path.go
@@ -128,7 +128,7 @@ func ishex(c rune) bool {
// UnicodeSanitize sanitizes string to be used in Hugo URL's, allowing only
// a predefined set of special Unicode characters.
-// If RemovePathAccents configuration flag is enabled, Uniccode accents
+// If RemovePathAccents configuration flag is enabled, Unicode accents
// are also removed.
// Spaces will be replaced with a single hyphen, and sequential hyphens will be reduced to one.
func (p *PathSpec) UnicodeSanitize(s string) string {
@@ -212,12 +212,12 @@ func GetDottedRelativePath(inPath string) string {
return dottedPath
}
-// ExtNoDelimiter takes a path and returns the extension, excluding the delmiter, i.e. "md".
+// ExtNoDelimiter takes a path and returns the extension, excluding the delimiter, i.e. "md".
func ExtNoDelimiter(in string) string {
return strings.TrimPrefix(Ext(in), ".")
}
-// Ext takes a path and returns the extension, including the delmiter, i.e. ".md".
+// Ext takes a path and returns the extension, including the delimiter, i.e. ".md".
func Ext(in string) string {
_, ext := fileAndExt(in, fpb)
return ext
@@ -229,13 +229,13 @@ func PathAndExt(in string) (string, string) {
}
// FileAndExt takes a path and returns the file and extension separated,
-// the extension including the delmiter, i.e. ".md".
+// the extension including the delimiter, i.e. ".md".
func FileAndExt(in string) (string, string) {
return fileAndExt(in, fpb)
}
// FileAndExtNoDelimiter takes a path and returns the file and extension separated,
-// the extension excluding the delmiter, e.g "md".
+// the extension excluding the delimiter, e.g "md".
func FileAndExtNoDelimiter(in string) (string, string) {
file, ext := fileAndExt(in, fpb)
return file, strings.TrimPrefix(ext, ".")
diff --git a/helpers/pathspec.go b/helpers/pathspec.go
index 5400249eb..49fd9a71c 100644
--- a/helpers/pathspec.go
+++ b/helpers/pathspec.go
@@ -37,7 +37,7 @@ type PathSpec struct {
Cfg config.Provider
}
-// NewPathSpec creats a new PathSpec from the given filesystems and language.
+// NewPathSpec creates a new PathSpec from the given filesystems and language.
func NewPathSpec(fs *hugofs.Fs, cfg config.Provider, logger loggers.Logger) (*PathSpec, error) {
return NewPathSpecWithBaseBaseFsProvided(fs, cfg, logger, nil)
}
diff --git a/helpers/url.go b/helpers/url.go
index 6f4242b09..8c39bc4fa 100644
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -105,7 +105,7 @@ func (p *PathSpec) URLize(uri string) string {
return p.URLEscape(p.MakePathSanitized(uri))
}
-// URLizeFilename creates an URL from a filename by esacaping unicode letters
+// URLizeFilename creates an URL from a filename by escaping unicode letters
// and turn any filepath separator into forward slashes.
func (p *PathSpec) URLizeFilename(filename string) string {
return p.URLEscape(filepath.ToSlash(filename))
@@ -280,7 +280,7 @@ func AddContextRoot(baseURL, relativePath string) string {
newPath := path.Join(url.Path, relativePath)
- // path strips traling slash, ignore root path.
+ // path strips trailing slash, ignore root path.
if newPath != "/" && strings.HasSuffix(relativePath, "/") {
newPath += "/"
}
diff --git a/hugofs/filter_fs.go b/hugofs/filter_fs.go
index 8b0afd38d..279a28312 100644
--- a/hugofs/filter_fs.go
+++ b/hugofs/filter_fs.go
@@ -276,7 +276,7 @@ func (f *filterDir) Readdirnames(count int) ([]string, error) {
}
// Try to extract the language from the given filename.
-// Any valid language identificator in the name will win over the
+// Any valid language identifier in the name will win over the
// language set on the file system, e.g. "mypost.en.md".
func langInfoFrom(languages map[string]int, name string) (string, string, string) {
var lang string
diff --git a/hugofs/nosymlink_test.go b/hugofs/nosymlink_test.go
index 99151ec67..e00dcf1a8 100644
--- a/hugofs/nosymlink_test.go
+++ b/hugofs/nosymlink_test.go
@@ -135,7 +135,7 @@ func TestNoSymlinkFs(t *testing.T) {
// Check readdir
f, err = fs.Open(workDir)
c.Assert(err, qt.IsNil)
- // There is at least one unsported symlink inside workDir
+ // There is at least one unsupported symlink inside workDir
_, err = f.Readdir(-1)
c.Assert(err, qt.IsNil)
f.Close()
diff --git a/hugofs/rootmapping_fs_test.go b/hugofs/rootmapping_fs_test.go
index e5f68d7a9..fc2ddeb62 100644
--- a/hugofs/rootmapping_fs_test.go
+++ b/hugofs/rootmapping_fs_test.go
@@ -270,7 +270,7 @@ func TestRootMappingFsMount(t *testing.T) {
c.Assert(err, qt.IsNil)
c.Assert(string(b), qt.Equals, "some no content")
- // Ambigous
+ // Ambiguous
_, err = rfs.Stat(filepath.FromSlash("content/singles/p1.md"))
c.Assert(err, qt.Not(qt.IsNil))
diff --git a/hugolib/breaking_changes_test.go b/hugolib/breaking_changes_test.go
index a22bc240f..495baff3e 100644
--- a/hugolib/breaking_changes_test.go
+++ b/hugolib/breaking_changes_test.go
@@ -21,7 +21,7 @@ import (
)
func Test073(t *testing.T) {
- asertDisabledTaxonomyAndTerm := func(b *sitesBuilder, taxonomy, term bool) {
+ assertDisabledTaxonomyAndTerm := func(b *sitesBuilder, taxonomy, term bool) {
b.Assert(b.CheckExists("public/tags/index.html"), qt.Equals, taxonomy)
b.Assert(b.CheckExists("public/tags/tag1/index.html"), qt.Equals, term)
}
@@ -88,7 +88,7 @@ taxonomy = ["JSON"]
`disableKinds = ["taxonomy", "taxonomyTerm"]`,
func(err error, out string, b *sitesBuilder) {
b.Assert(err, qt.IsNil)
- asertDisabledTaxonomyAndTerm(b, false, false)
+ assertDisabledTaxonomyAndTerm(b, false, false)
},
},
{
@@ -96,7 +96,7 @@ taxonomy = ["JSON"]
`disableKinds = ["taxonomyTerm"]`,
func(err error, out string, b *sitesBuilder) {
b.Assert(err, qt.IsNil)
- asertDisabledTaxonomyAndTerm(b, false, true)
+ assertDisabledTaxonomyAndTerm(b, false, true)
},
},
{
@@ -113,7 +113,7 @@ taxonomy = ["JSON"]
ignoreErrors = ["error-disable-taxonomy"]`,
func(err error, out string, b *sitesBuilder) {
b.Assert(err, qt.IsNil)
- asertDisabledTaxonomyAndTerm(b, false, true)
+ assertDisabledTaxonomyAndTerm(b, false, true)
},
},
} {
diff --git a/hugolib/content_map.go b/hugolib/content_map.go
index ca2aa3672..3f5ed65c3 100644
--- a/hugolib/content_map.go
+++ b/hugolib/content_map.go
@@ -58,8 +58,8 @@ const (
cmLeafSeparator = "__hl_"
)
-// Used to mark ambigous keys in reverse index lookups.
-var ambigousContentNode = &contentNode{}
+// Used to mark ambiguous keys in reverse index lookups.
+var ambiguousContentNode = &contentNode{}
func newContentMap(cfg contentMapConfig) *contentMap {
m := &contentMap{
@@ -86,8 +86,8 @@ func newContentMap(cfg contentMapConfig) *contentMap {
addToReverseMap := func(k string, n *contentNode, m map[interface{}]*contentNode) {
k = strings.ToLower(k)
existing, found := m[k]
- if found && existing != ambigousContentNode {
- m[k] = ambigousContentNode
+ if found && existing != ambiguousContentNode {
+ m[k] = ambiguousContentNode
} else if !found {
m[k] = n
}
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go
index 296363359..74dd0e029 100644
--- a/hugolib/content_map_page.go
+++ b/hugolib/content_map_page.go
@@ -232,7 +232,7 @@ func (m *pageMap) newResource(fim hugofs.FileMetaInfo, owner *pageState) (resour
outputFormats := owner.m.outputFormats()
seen := make(map[string]bool)
var targetBasePaths []string
- // Make sure bundled resources are published to all of the ouptput formats'
+ // Make sure bundled resources are published to all of the output formats'
// sub paths.
for _, f := range outputFormats {
p := f.Path
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go
index 3ea1d8ab0..90f2685af 100644
--- a/hugolib/embedded_shortcodes_test.go
+++ b/hugolib/embedded_shortcodes_test.go
@@ -185,7 +185,7 @@ func TestShortcodeYoutube(t *testing.T) {
`{{< youtube id="w7Ft2ymGmfc" class="video" autoplay="true" >}}`,
"(?s)\n<div class=\"video\">.*?<iframe src=\"https://www.youtube.com/embed/w7Ft2ymGmfc\\?autoplay=1\".*?allowfullscreen title=\"YouTube Video\">.*?</iframe>.*?</div>",
},
- // set custom title for accessability)
+ // set custom title for accessibility)
{
`{{< youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" >}}`,
"(?s)\n<div style=\".*?\">.*?<iframe src=\"https://www.youtube.com/embed/w7Ft2ymGmfc\" style=\".*?\" allowfullscreen title=\"A New Hugo Site in Under Two Minutes\">.*?</iframe>.*?</div>",
diff --git a/hugolib/hugo_modules_test.go b/hugolib/hugo_modules_test.go
index f63da5a07..4946d0f59 100644
--- a/hugolib/hugo_modules_test.go
+++ b/hugolib/hugo_modules_test.go
@@ -151,7 +151,7 @@ JS imported in module: |
"devDependencies": {
"postcss-cli": "