mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
all: Fix typos in function names and comments
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
12dc9a6e4a
commit
9009c8cdca
@@ -35,7 +35,7 @@ func TestLoadConfigLanguageParamsOverrideIssue10620(t *testing.T) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
title = "Base Title"
|
||||
staticDir = "mystatic"
|
||||
[params]
|
||||
@@ -79,7 +79,7 @@ func TestLoadConfig(t *testing.T) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
title = "Base Title"
|
||||
staticDir = "mystatic"
|
||||
[params]
|
||||
@@ -131,7 +131,7 @@ myparam = "svParamValue"
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
title = "Base Title"
|
||||
defaultContentLanguage = "sv"
|
||||
disableLanguages = ["sv"]
|
||||
@@ -178,7 +178,7 @@ running = true
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
title = "Base Title"
|
||||
[params]
|
||||
p1 = "p1base"
|
||||
|
@@ -30,7 +30,7 @@ b = "bc1"
|
||||
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
ignoreErrors = ["error-missing-instagram-accesstoken"]
|
||||
[params]
|
||||
a = "a1"
|
||||
|
@@ -25,7 +25,7 @@ func TestData(t *testing.T) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
theme = "mytheme"
|
||||
-- data/a.toml --
|
||||
v1 = "a_v1"
|
||||
|
@@ -30,7 +30,7 @@ func TestEmbeddedShortcodes(t *testing.T) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "setion"]
|
||||
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "page", "section"]
|
||||
ignoreErrors = ["error-missing-instagram-accesstoken"]
|
||||
[params]
|
||||
foo = "bar"
|
||||
|
@@ -326,7 +326,7 @@ func (h *HugoSites) postProcess(l logg.LevelLogger) error {
|
||||
// This will only be set when js.Build have been triggered with
|
||||
// imports that resolves to the project or a module.
|
||||
// Write a jsconfig.json file to the project's /asset directory
|
||||
// to help JS intellisense in VS Code etc.
|
||||
// to help JS IntelliSense in VS Code etc.
|
||||
if !h.ResourceSpec.BuildConfig().NoJSConfigInAssets && h.BaseFs.Assets.Dirs != nil {
|
||||
fi, err := h.BaseFs.Assets.Fs.Stat("")
|
||||
if err != nil {
|
||||
|
@@ -235,7 +235,7 @@ func TestGetPage(t *testing.T) {
|
||||
{"Root relative, no slash, root page", page.KindPage, nil, []string{"about.md", "ABOUT.md"}, "about page"},
|
||||
{"Root relative, no slash, section", page.KindSection, nil, []string{"sect3"}, "section 3"},
|
||||
{"Root relative, no slash, section page", page.KindPage, nil, []string{"sect3/page1.md"}, "Title3_1"},
|
||||
{"Root relative, no slash, sub setion", page.KindSection, nil, []string{"sect3/sect7"}, "another sect7"},
|
||||
{"Root relative, no slash, sub section", page.KindSection, nil, []string{"sect3/sect7"}, "another sect7"},
|
||||
{"Root relative, no slash, nested page", page.KindPage, nil, []string{"sect3/subsect/deep.md"}, "deep page"},
|
||||
{"Root relative, no slash, OS slashes", page.KindPage, nil, []string{filepath.FromSlash("sect5/page3.md")}, "Title5_3"},
|
||||
|
||||
@@ -247,7 +247,7 @@ func TestGetPage(t *testing.T) {
|
||||
// content root relative paths without a leading slash, the lookup
|
||||
// returns /sect7. This undermines ambiguity detection, but we have no choice.
|
||||
//{"Ambiguous", nil, []string{"sect7"}, ""},
|
||||
{"Section, ambigous", page.KindSection, nil, []string{"sect7"}, "Sect7s"},
|
||||
{"Section, ambiguous", page.KindSection, nil, []string{"sect7"}, "Sect7s"},
|
||||
|
||||
{"Absolute, home", page.KindHome, nil, []string{"/", ""}, "home page"},
|
||||
{"Absolute, page", page.KindPage, nil, []string{"/about.md", "/about"}, "about page"},
|
||||
|
@@ -885,7 +885,7 @@ func (s *Site) getLanguageTargetPathLang(alwaysInSubDir bool) string {
|
||||
return s.getLanguagePermalinkLang(alwaysInSubDir)
|
||||
}
|
||||
|
||||
// get any lanaguagecode to prefix the relative permalink with.
|
||||
// get any language code to prefix the relative permalink with.
|
||||
func (s *Site) getLanguagePermalinkLang(alwaysInSubDir bool) string {
|
||||
if !s.h.isMultiLingual() || s.h.Conf.IsMultihost() {
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user