PippoRJ / hugo-refresh

MIT License
116 stars 82 forks source link

Issue with Leaf Bundle organization #62

Closed Michel69-de closed 3 years ago

Michel69-de commented 3 years ago

I don't know if its a Theme or a Hugo Issue

As I understand, I can have an index.md and a 1.md in the same directory. https://gohugo.io/content-management/page-bundles/#examples-of-leaf-bundle-organization

Tried to do so

\content\topic_2\subtopic_4\example_2_subtopic_4\index.md
\content\topic_2\subtopic_4\example_2_subtopic_4\1.md

I can access

http://localhost:1313/topic_2/subtopic_4/example_2_subtopic_4/

but get an 404 page not found on

http://localhost:1313/topic_2/subtopic_4/example_2_subtopic_4/1/

If I rename index.md to 0.md - everything works fine. I can acces

http://localhost:1313/topic_2/subtopic_4/example_2_subtopic_4/0/

and

http://localhost:1313/topic_2/subtopic_4/example_2_subtopic_4/1/

Any idea?

PippoRJ commented 3 years ago

Hey @Michel69-de , I don't know tbh... I don't think is a theme issue.. I didn't modify anything of this behaviour.. You may want to report it here: https://github.com/gohugoio/hugo/issues

I tried to name the .md file with string names and they seems to work fine... maybe there is a problem with numbers as names..

Michel69-de commented 3 years ago
\content\topic_2\subtopic_4\example_2_subtopic_4\index.md
\content\topic_2\subtopic_4\example_2_subtopic_4\1.md

If i name it

\content\topic_2\subtopic_4\example_2_subtopic_4\index.md
\content\topic_2\subtopic_4\example_2_subtopic_4\content1.md

-> same result. contend1 will not be created .

I tried it on hugo v0.81.0-59D15C97+extended windows/amd64 BuildDate=2021-02-19T17:07:12Z VendorInfo=gohugoio

PippoRJ commented 3 years ago

I think Leaf bundle produce html page only from the index.md Just above here https://gohugo.io/content-management/page-bundles/#leaf-bundles you can see a table.. look at the last row "Content from non-index page files…"

Michel69-de commented 3 years ago
content/
├── about
│   ├── index.md
├── posts
│   ├── my-post
│   │   ├── content1.md
│   │   ├── content2.md
│   │   ├── image1.jpg
│   │   ├── image2.png
│   │   └── index.md
│   └── my-other-post
│       └── index.md
│
└── another-section

In my-post there are an index.md and contend1.md and contend2.md

For testing i used an other theme an it worked like expected. Maybe one time I figure out how to debug the rebuild process of hugo.

PippoRJ commented 3 years ago

I think that organization might be seen as section/sub-sections: https://gohugo.io/content-management/sections/

I organised my website as branch bundle --> leaf bundle https://gohugo.io/content-management/page-bundles/

This might also be useful: https://gohugo.io/content-management/organization/

Michel69-de commented 3 years ago

Figured out the following: The theme has some restrictions like this one. E.g. its not possible to use different list templates in sections. Maybe the theme has an influence on lookup order. Good to know it. You can close this issue.