mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Support pages without folders
This commit is contained in:
@@ -92,6 +92,9 @@ func initializePage(filename string) (page Page) {
|
||||
|
||||
func (p *Page) setSection() {
|
||||
x := strings.Split(p.FileName, string(os.PathSeparator))
|
||||
if len(x) <= 1 {
|
||||
return
|
||||
}
|
||||
|
||||
if section := x[len(x)-2]; section != "content" {
|
||||
p.Section = section
|
||||
|
Reference in New Issue
Block a user