Instead of duplicating, you could instead specify the urls for the nested sections:
Given the following content structure:
content
├── cat1
│ ├── _index.md
│ ├── subcat1
│ │ ├── _index.md
│ │ ├── item1.md
│ │ └── item2.md
│ └── subcat2
│ ├── _index.md
│ ├── item1.md
│ └── item2.md
└── _index.md
If I set the urls in the front matter:
<!-- cat1/_index.md -->
url: /cat1/index.html
<!-- cat1/subcat1/_index.md -->
url: /cat1/subcat1/index.html
<!-- cat1/subcat2/_index.md -->
url: /cat1/subcat2/index.html
With uglyURLS = true , I get the following generated:
public
├── cat1
│ ├── index.html
│ ├── subcat1
│ │ ├── index.html
│ │ ├── item1.html
│ │ └── item2.html
│ └── subcat2
│ ├── index.html
│ ├── item1.html
│ └── item2.html
└── index.html