mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-13 13:03:00 +00:00
Compare commits
4 commits
561a863e41
...
7a335ce95a
Author | SHA1 | Date | |
---|---|---|---|
7a335ce95a | |||
4e483f5d4a | |||
06d248910c | |||
13221bfc3c |
|
@ -397,7 +397,7 @@ func DeprecateLevel(item, alternative, version string, level logg.Level) {
|
|||
loggers.Log().Logger().WithLevel(level).WithField(loggers.FieldNameCmd, "deprecated").Logf(msg)
|
||||
}
|
||||
|
||||
// We ususally do about one minor version a month.
|
||||
// We usually do about one minor version a month.
|
||||
// We want people to run at least the current and previous version without any warnings.
|
||||
// We want people who don't update Hugo that often to see the warnings and errors before we remove the feature.
|
||||
func deprecationLogLevelFromVersion(ver string) logg.Level {
|
||||
|
|
|
@ -17,7 +17,7 @@ package hugo
|
|||
// This should be the only one.
|
||||
var CurrentVersion = Version{
|
||||
Major: 0,
|
||||
Minor: 126,
|
||||
PatchLevel: 0,
|
||||
Suffix: "-DEV",
|
||||
Minor: 125,
|
||||
PatchLevel: 2,
|
||||
Suffix: "",
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ type (
|
|||
)
|
||||
|
||||
// NodeShiftTree is the root of a tree that can be shaped using the Shape method.
|
||||
// Note that multipled shapes of the same tree is meant to be used concurrently,
|
||||
// Note that multiplied shapes of the same tree is meant to be used concurrently,
|
||||
// so use the applicable locking when needed.
|
||||
type NodeShiftTree[T any] struct {
|
||||
tree *radix.Tree
|
||||
|
|
|
@ -676,3 +676,37 @@ menu: main
|
|||
b.AssertFileContent("public/fr/index.html", `<a href="/fr/p1/">p1</a>`)
|
||||
b.AssertLogNotContains("WARN")
|
||||
}
|
||||
|
||||
func TestSectionPagesIssue12399(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
disableKinds = ['rss','sitemap','taxonomy','term']
|
||||
capitalizeListTitles = false
|
||||
pluralizeListTitles = false
|
||||
sectionPagesMenu = 'main'
|
||||
-- content/p1.md --
|
||||
---
|
||||
title: p1
|
||||
---
|
||||
-- content/s1/p2.md --
|
||||
---
|
||||
title: p2
|
||||
menus: main
|
||||
---
|
||||
-- content/s1/p3.md --
|
||||
---
|
||||
title: p3
|
||||
---
|
||||
-- layouts/_default/list.html --
|
||||
{{ range site.Menus.main }}<a href="{{ .URL }}">{{ .Name }}</a>{{ end }}
|
||||
-- layouts/_default/single.html --
|
||||
{{ .Title }}
|
||||
`
|
||||
|
||||
b := Test(t, files)
|
||||
|
||||
b.AssertFileExists("public/index.html", true)
|
||||
b.AssertFileContent("public/index.html", `<a href="/s1/p2/">p2</a><a href="/s1/">s1</a>`)
|
||||
}
|
||||
|
|
|
@ -659,7 +659,7 @@ func (s *Site) assembleMenus() error {
|
|||
|
||||
if sectionPagesMenu != "" {
|
||||
if err := s.pageMap.forEachPage(pagePredicates.ShouldListGlobal, func(p *pageState) (bool, error) {
|
||||
if p.IsHome() || !p.m.shouldBeCheckedForMenuDefinitions() {
|
||||
if p.Kind() != kinds.KindSection || !p.m.shouldBeCheckedForMenuDefinitions() {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package blackfriday holds some compability functions for the old Blackfriday v1 Markdown engine.
|
||||
// Package blackfriday holds some compatibility functions for the old Blackfriday v1 Markdown engine.
|
||||
package blackfriday
|
||||
|
||||
import "unicode"
|
||||
|
|
Loading…
Reference in a new issue