Skip to content

Commit 168d375

Browse files
authored
all: Fix typos and some URLs
1 parent 4a53fd5 commit 168d375

18 files changed

+26
-26
lines changed

helpers/general.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func ReaderContains(r io.Reader, subslice []byte) bool {
188188
//
189189
// - "Go" (strings.Title)
190190
// - "AP" (see https://www.apstylebook.com/)
191-
// - "Chicago" (see http://www.chicagomanualofstyle.org/home.html)
191+
// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
192192
// - "FirstUpper" (only the first character is upper case)
193193
// - "None" (no transformation)
194194
//

hugofs/component_fs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type componentFsDir struct {
5959
fs *componentFs
6060
}
6161

62-
// ReadDir reads count entries from this virtual directorie and
62+
// ReadDir reads count entries from this virtual directory and
6363
// sorts the entries according to the component filesystem rules.
6464
func (f *componentFsDir) ReadDir(count int) ([]iofs.DirEntry, error) {
6565
fis, err := f.DirOnlyOps.(iofs.ReadDirFile).ReadDir(-1)

hugolib/content_map_page.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,16 @@ type pageMap struct {
103103
}
104104

105105
// pageTrees holds pages and resources in a tree structure for all sites/languages.
106-
// Eeach site gets its own tree set via the Shape method.
106+
// Each site gets its own tree set via the Shape method.
107107
type pageTrees struct {
108108
// This tree contains all Pages.
109-
// This include regular pages, sections, taxonimies and so on.
109+
// This include regular pages, sections, taxonomies and so on.
110110
// Note that all of these trees share the same key structure,
111111
// so you can take a leaf Page key and do a prefix search
112112
// with key + "/" to get all of its resources.
113113
treePages *doctree.NodeShiftTree[contentNodeI]
114114

115-
// This tree contains Resoures bundled in pages.
115+
// This tree contains Resources bundled in pages.
116116
treeResources *doctree.NodeShiftTree[contentNodeI]
117117

118118
// All pages and resources.
@@ -1012,7 +1012,7 @@ func (h *HugoSites) resolveAndClearStateForIdentities(
10121012
seen := map[string]bool{
10131013
change.IdentifierBase(): true,
10141014
}
1015-
// Print the top level dependenies.
1015+
// Print the top level dependencies.
10161016
identity.WalkIdentitiesDeep(change, func(level int, id identity.Identity) bool {
10171017
if level > 1 {
10181018
return true

hugolib/dates_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ ExpiryDate: 2099-07-13 15:28:01 +0000 UTC`
169169
// have date literals.
170170

171171
// YAML
172-
// Note: This is with go-yaml v2, I suspect v3 will fail with the unquouted values.
172+
// Note: This is with go-yaml v2, I suspect v3 will fail with the unquoted values.
173173
b.AssertFileContent("public/en/short-date-yaml-unqouted/index.html", expectShortDateEn)
174174
b.AssertFileContent("public/nn/short-date-yaml-unqouted/index.html", expectShortDateNn)
175175
b.AssertFileContent("public/en/short-date-yaml-qouted/index.html", expectShortDateEn)

hugolib/hugo_sites_build.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (h *HugoSites) process(ctx context.Context, l logg.LevelLogger, config *Bui
236236
return h.processFull(ctx, l, *config)
237237
}
238238

239-
// assemble creates missing sections, applies agregate values (e.g. dates, cascading params),
239+
// assemble creates missing sections, applies aggregate values (e.g. dates, cascading params),
240240
// removes disabled pages etc.
241241
func (h *HugoSites) assemble(ctx context.Context, l logg.LevelLogger, bcfg *BuildCfg) error {
242242
l = l.WithField("step", "assemble")

hugolib/page__meta.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ type pageMetaParams struct {
9292

9393
// From page front matter.
9494
type pageMetaFrontMatter struct {
95-
configuredOutputFormats output.Formats // outputs defiend in front matter.
95+
configuredOutputFormats output.Formats // outputs defined in front matter.
9696
}
9797

9898
func (m *pageMetaParams) init(preserveOringal bool) {
@@ -333,7 +333,7 @@ func (ps *pageState) setMetaPost(cascade map[page.PageMatcher]maps.Params) error
333333

334334
}
335335

336-
// Apply cascades first so they can be overriden later.
336+
// Apply cascades first so they can be overridden later.
337337
if cascade != nil {
338338
if ps.m.pageConfig.Cascade != nil {
339339
for k, v := range cascade {

hugolib/page__paths.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func createTargetPathDescriptor(p *pageState) (page.TargetPathDescriptor, error)
150150
opath, _ = url.QueryUnescape(opath)
151151
if strings.HasSuffix(opath, "//") {
152152
// When rewriting the _index of the section the permalink config is applied to,
153-
// we get douple slashes at the end sometimes; clear them up here
153+
// we get double slashes at the end sometimes; clear them up here
154154
opath = strings.TrimSuffix(opath, "/")
155155
}
156156

hugolib/pagebundler_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ baseURL = "https://example.org"
516516
disableKinds = ["taxonomy", "term"]
517517
disableLiveReload = true
518518
[outputs]
519-
# This looks odd, but it triggers the behaviour in #5858
519+
# This looks odd, but it triggers the behavior in #5858
520520
# The total output formats list gets sorted, so CSS before HTML.
521521
home = [ "CSS" ]
522522
-- content/mybundle/index.md --

hugolib/rebuild_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ func TestRebuildVariations(t *testing.T) {
462462
files := `
463463
-- hugo.toml --
464464
baseURL = "https://example.com"
465-
disdableKinds = ["term", "taxonomy"]
465+
disableKinds = ["term", "taxonomy"]
466466
disableLiveReload = true
467467
defaultContentLanguage = "nn"
468468
paginate = 20
@@ -597,7 +597,7 @@ Codeblock Include: {{ .Title }}|
597597
// - Edit content file direct
598598
// - Edit content file transitive shortcode
599599
// - Edit content file transitive render hook
600-
// - Rename one languge version of a content file
600+
// - Rename one language version of a content file
601601
// - Delete content file, check site.RegularPages and section.RegularPagesRecursive (length)
602602
// - Add content file (see above).
603603
// - Edit shortcode
@@ -1284,7 +1284,7 @@ func benchmarkFilesEdit(count int) string {
12841284
files := `
12851285
-- hugo.toml --
12861286
baseURL = "https://example.com"
1287-
disdableKinds = ["term", "taxonomy"]
1287+
disableKinds = ["term", "taxonomy"]
12881288
disableLiveReload = true
12891289
-- layouts/_default/single.html --
12901290
Single: {{ .Title }}|{{ .Content }}|

hugolib/shortcode.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ type shortcode struct {
206206
// Before Hug0 0.55 we didn't send any shortcode output to the markup
207207
// renderer, and this flag told Hugo to process the {{ .Inner }} content
208208
// separately.
209-
// The old behaviour can be had by starting your shortcode template with:
209+
// The old behavior can be had by starting your shortcode template with:
210210
// {{ $_hugo_config := `{ "version": 1 }`}}
211211
doMarkup bool
212212

@@ -422,7 +422,7 @@ func doRenderShortcode(
422422
}
423423
}
424424

425-
// Pre Hugo 0.55 this was the behaviour even for the outer-most
425+
// Pre Hugo 0.55 this was the behavior even for the outer-most
426426
// shortcode.
427427
if sc.doMarkup && (level > 0 || sc.configVersion() == 1) {
428428
var err error

hugolib/site.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ func (h *HugoSites) fileEventsContentPaths(p []pathChange) []pathChange {
479479
}
480480
}
481481

482-
// Remve all files below dir.
482+
// Remove all files below dir.
483483
if len(dirs) > 0 {
484484
n := 0
485485
for _, d := range dirs {
@@ -877,7 +877,7 @@ func (s *Site) render(ctx *siteRenderContext) (err error) {
877877
if ctx.outIdx == 0 {
878878
// Note that even if disableAliases is set, the aliases themselves are
879879
// preserved on page. The motivation with this is to be able to generate
880-
// 301 redirects in a .htacess file and similar using a custom output format.
880+
// 301 redirects in a .htaccess file and similar using a custom output format.
881881
if !s.conf.DisableAliases {
882882
// Aliases must be rendered before pages.
883883
// Some sites, Hugo docs included, have faulty alias definitions that point

hugolib/site_render.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type siteRenderContext struct {
4747
}
4848

4949
// Whether to render 404.html, robotsTXT.txt and similar.
50-
// These are useually rendered once in the root of public.
50+
// These are usually rendered once in the root of public.
5151
func (s siteRenderContext) shouldRenderStandalonePage(kind string) bool {
5252
if s.multihost || kind == kinds.KindSitemap {
5353
// 1 per site

livereload/connection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type connection struct {
2828
send chan []byte
2929

3030
// There is a potential data race, especially visible with large files.
31-
// This is protected by synchronisation of the send channel's close.
31+
// This is protected by synchronization of the send channel's close.
3232
closer sync.Once
3333
}
3434

markup/blackfriday/anchors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
// Package blackfriday holds some copmpability functions for the old Blackfriday v1 Markdown engine.
14+
// Package blackfriday holds some compability functions for the old Blackfriday v1 Markdown engine.
1515
package blackfriday
1616

1717
import "unicode"

modules/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ type Client struct {
141141
goBinaryStatus goBinaryStatus
142142
}
143143

144-
// Graph writes a module dependenchy graph to the given writer.
144+
// Graph writes a module dependency graph to the given writer.
145145
func (c *Client) Graph(w io.Writer) error {
146146
mc, coll := c.collect(true)
147147
if coll.err != nil {

parser/pageparser/doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
// Package pageparser provides a parser for Hugo content files (Markdown, HTML etc.) in Hugo.
1515
// This implementation is highly inspired by the great talk given by Rob Pike called "Lexical Scanning in Go"
1616
// It's on YouTube, Google it!.
17-
// See slides here: http://cuddle.googlecode.com/hg/talk/lex.html
17+
// See slides here: https://go.dev/talks/2011/lex.slide#1
1818
package pageparser

resources/transform_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func TestTransform(t *testing.T) {
185185

186186
spec := newTestResourceSpec(specDescriptor{c: c})
187187

188-
// Two transformations with same id, different behaviour.
188+
// Two transformations with same id, different behavior.
189189
t1 := createContentReplacer("t1", "blue", "green")
190190
t2 := createContentReplacer("t1", "color", "car")
191191

watcher/batcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Batcher struct {
3030
}
3131

3232
// New creates and starts a Batcher with the given time interval.
33-
// It will fall back to a poll based watcher if native isn's supported.
33+
// It will fall back to a poll based watcher if native isn't supported.
3434
// To always use polling, set poll to true.
3535
func New(intervalBatcher, intervalPoll time.Duration, poll bool) (*Batcher, error) {
3636
var err error

0 commit comments

Comments
 (0)