summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorChristian Oliff <christianoliff@pm.me>2024-02-18 20:16:30 +0900
committerGitHub <noreply@github.com>2024-02-18 12:16:30 +0100
commit168d3757841d2064e11f8d122797e2771273d367 (patch)
treec805e6633220d8dda3197589aa6d7c270909d2bc /hugolib
parent4a53fd56b71c8a2f83e5ace38bd7a54000c30f94 (diff)
all: Fix typos and some URLs
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/content_map_page.go8
-rw-r--r--hugolib/dates_test.go2
-rw-r--r--hugolib/hugo_sites_build.go2
-rw-r--r--hugolib/page__meta.go4
-rw-r--r--hugolib/page__paths.go2
-rw-r--r--hugolib/pagebundler_test.go2
-rw-r--r--hugolib/rebuild_test.go6
-rw-r--r--hugolib/shortcode.go4
-rw-r--r--hugolib/site.go4
-rw-r--r--hugolib/site_render.go2
10 files changed, 18 insertions, 18 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go
index d9cbddfba..ae7468b0a 100644
--- a/hugolib/content_map_page.go
+++ b/hugolib/content_map_page.go
@@ -103,16 +103,16 @@ type pageMap struct {
}
// pageTrees holds pages and resources in a tree structure for all sites/languages.
-// Eeach site gets its own tree set via the Shape method.
+// Each site gets its own tree set via the Shape method.
type pageTrees struct {
// This tree contains all Pages.
- // This include regular pages, sections, taxonimies and so on.
+ // This include regular pages, sections, taxonomies and so on.
// Note that all of these trees share the same key structure,
// so you can take a leaf Page key and do a prefix search
// with key + "/" to get all of its resources.
treePages *doctree.NodeShiftTree[contentNodeI]
- // This tree contains Resoures bundled in pages.
+ // This tree contains Resources bundled in pages.
treeResources *doctree.NodeShiftTree[contentNodeI]
// All pages and resources.
@@ -1012,7 +1012,7 @@ func (h *HugoSites) resolveAndClearStateForIdentities(
seen := map[string]bool{
change.IdentifierBase(): true,
}
- // Print the top level dependenies.
+ // Print the top level dependencies.
identity.WalkIdentitiesDeep(change, func(level int, id identity.Identity) bool {
if level > 1 {
return true
diff --git a/hugolib/dates_test.go b/hugolib/dates_test.go
index 5443e5852..784fc101c 100644
--- a/hugolib/dates_test.go
+++ b/hugolib/dates_test.go
@@ -169,7 +169,7 @@ ExpiryDate: 2099-07-13 15:28:01 +0000 UTC`
// have date literals.
// YAML
- // Note: This is with go-yaml v2, I suspect v3 will fail with the unquouted values.
+ // Note: This is with go-yaml v2, I suspect v3 will fail with the unquoted values.
b.AssertFileContent("public/en/short-date-yaml-unqouted/index.html", expectShortDateEn)
b.AssertFileContent("public/nn/short-date-yaml-unqouted/index.html", expectShortDateNn)
b.AssertFileContent("public/en/short-date-yaml-qouted/index.html", expectShortDateEn)
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index 3a046df3b..93acdbf6b 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -236,7 +236,7 @@ func (h *HugoSites) process(ctx context.Context, l logg.LevelLogger, config *Bui
return h.processFull(ctx, l, *config)
}
-// assemble creates missing sections, applies agregate values (e.g. dates, cascading params),
+// assemble creates missing sections, applies aggregate values (e.g. dates, cascading params),
// removes disabled pages etc.
func (h *HugoSites) assemble(ctx context.Context, l logg.LevelLogger, bcfg *BuildCfg) error {
l = l.WithField("step", "assemble")
diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go
index 34fd096bd..03f4d4d19 100644
--- a/hugolib/page__meta.go
+++ b/hugolib/page__meta.go
@@ -92,7 +92,7 @@ type pageMetaParams struct {
// From page front matter.
type pageMetaFrontMatter struct {
- configuredOutputFormats output.Formats // outputs defiend in front matter.
+ configuredOutputFormats output.Formats // outputs defined in front matter.
}
func (m *pageMetaParams) init(preserveOringal bool) {
@@ -333,7 +333,7 @@ func (ps *pageState) setMetaPost(cascade map[page.PageMatcher]maps.Params) error
}
- // Apply cascades first so they can be overriden later.
+ // Apply cascades first so they can be overridden later.
if cascade != nil {
if ps.m.pageConfig.Cascade != nil {
for k, v := range cascade {
diff --git a/hugolib/page__paths.go b/hugolib/page__paths.go
index 6ae68aa25..d89388f81 100644
--- a/hugolib/page__paths.go
+++ b/hugolib/page__paths.go
@@ -150,7 +150,7 @@ func createTargetPathDescriptor(p *pageState) (page.TargetPathDescriptor, error)
opath, _ = url.QueryUnescape(opath)
if strings.HasSuffix(opath, "//") {
// When rewriting the _index of the section the permalink config is applied to,
- // we get douple slashes at the end sometimes; clear them up here
+ // we get double slashes at the end sometimes; clear them up here
opath = strings.TrimSuffix(opath, "/")
}
diff --git a/hugolib/pagebundler_test.go b/hugolib/pagebundler_test.go
index e4d1248a5..9f5255c74 100644
--- a/hugolib/pagebundler_test.go
+++ b/hugolib/pagebundler_test.go
@@ -516,7 +516,7 @@ baseURL = "https://example.org"
disableKinds = ["taxonomy", "term"]
disableLiveReload = true
[outputs]
-# This looks odd, but it triggers the behaviour in #5858
+# This looks odd, but it triggers the behavior in #5858
# The total output formats list gets sorted, so CSS before HTML.
home = [ "CSS" ]
-- content/mybundle/index.md --
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go
index 6e43a4570..f599d640d 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -462,7 +462,7 @@ func TestRebuildVariations(t *testing.T) {
files := `
-- hugo.toml --
baseURL = "https://example.com"
-disdableKinds = ["term", "taxonomy"]
+disableKinds = ["term", "taxonomy"]
disableLiveReload = true
defaultContentLanguage = "nn"
paginate = 20
@@ -597,7 +597,7 @@ Codeblock Include: {{ .Title }}|
// - Edit content file direct
// - Edit content file transitive shortcode
// - Edit content file transitive render hook
- // - Rename one languge version of a content file
+ // - Rename one language version of a content file
// - Delete content file, check site.RegularPages and section.RegularPagesRecursive (length)
// - Add content file (see above).
// - Edit shortcode
@@ -1284,7 +1284,7 @@ func benchmarkFilesEdit(count int) string {
files := `
-- hugo.toml --
baseURL = "https://example.com"
-disdableKinds = ["term", "taxonomy"]
+disableKinds = ["term", "taxonomy"]
disableLiveReload = true
-- layouts/_default/single.html --
Single: {{ .Title }}|{{ .Content }}|
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go
index 0ec5d5ce4..7cc2cba27 100644
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -206,7 +206,7 @@ type shortcode struct {
// Before Hug0 0.55 we didn't send any shortcode output to the markup
// renderer, and this flag told Hugo to process the {{ .Inner }} content
// separately.
- // The old behaviour can be had by starting your shortcode template with:
+ // The old behavior can be had by starting your shortcode template with:
// {{ $_hugo_config := `{ "version": 1 }`}}
doMarkup bool
@@ -422,7 +422,7 @@ func doRenderShortcode(
}
}
- // Pre Hugo 0.55 this was the behaviour even for the outer-most
+ // Pre Hugo 0.55 this was the behavior even for the outer-most
// shortcode.
if sc.doMarkup && (level > 0 || sc.configVersion() == 1) {
var err error
diff --git a/hugolib/site.go b/hugolib/site.go
index 8ae09dd0f..5a58e8373 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -479,7 +479,7 @@ func (h *HugoSites) fileEventsContentPaths(p []pathChange) []pathChange {
}
}
- // Remve all files below dir.
+ // Remove all files below dir.
if len(dirs) > 0 {
n := 0
for _, d := range dirs {
@@ -877,7 +877,7 @@ func (s *Site) render(ctx *siteRenderContext) (err error) {
if ctx.outIdx == 0 {
// Note that even if disableAliases is set, the aliases themselves are
// preserved on page. The motivation with this is to be able to generate
- // 301 redirects in a .htacess file and similar using a custom output format.
+ // 301 redirects in a .htaccess file and similar using a custom output format.
if !s.conf.DisableAliases {
// Aliases must be rendered before pages.
// Some sites, Hugo docs included, have faulty alias definitions that point
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index ef3e3aeef..1cf4b9a61 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -47,7 +47,7 @@ type siteRenderContext struct {
}
// Whether to render 404.html, robotsTXT.txt and similar.
-// These are useually rendered once in the root of public.
+// These are usually rendered once in the root of public.
func (s siteRenderContext) shouldRenderStandalonePage(kind string) bool {
if s.multihost || kind == kinds.KindSitemap {
// 1 per site