mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Misc permalinks adjustments
* Move config loading to the page package * Fix a lower bound panic for the `:sections` slice syntax. * Always return the `:title` * Add some permalinks integration tests * Also see issues below Fixes #9448 Fixes #11184 See #8523
This commit is contained in:
@@ -680,7 +680,14 @@ func (m *contentMap) splitKey(k string) []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
return strings.Split(k, "/")[1:]
|
||||
parts := strings.Split(k, "/")[1:]
|
||||
if len(parts) == 0 {
|
||||
return nil
|
||||
}
|
||||
if parts[len(parts)-1] == "" {
|
||||
parts = parts[:len(parts)-1]
|
||||
}
|
||||
return parts
|
||||
}
|
||||
|
||||
func (m *contentMap) testDump() string {
|
||||
|
Reference in New Issue
Block a user