HUGO

Is there a way that I can use README.md instead of _index.md?

Is there a setting somewhere where or a way that I can associate README.md as a list page instead of using _index.md ? What about associating index.md with foo.md for single pages?

Thanks

No that is not possible.

Page Leaf bundles require an index.md.

A file called foo.md is of course an acceptable content file but it will not be a Page Leaf Bundle.

While that is true for the general/practical use case, have a look at this:

3 Likes

@bep
You just opened a can of worms IMHO. :upside_down_face:

2 Likes

It looks like that does work, does it work for nested? I could not get it to work for
nested but I think this may have something to do with already mounting on the post?
The README.md does behave as a single page or a list page depending on the
module.mounts. Not sure if there’s a catch to it? Other than duplicating this for all
the folders, which is not a big deal:

[[module.mounts]]
source = "content/README.md"
target = "content/_index.md"

[[module.mounts]]
source = "content/post/README.md"
target = "content/post/_index.md"

[[module.mounts]]
source = "content/post/nested/README.md"
target = "content/post/nested/_index.md"

[[module.mounts]]
source = "content/somefolder/testing.md"
target = "content/somefolder/_index.md"

thanks my issue has been fixed.