bryanbraun / middleman-navtree

For building navigation trees & menus in Middleman.
MIT License
45 stars 17 forks source link

The titles of folders are not displayed #8

Open pyrog opened 9 years ago

pyrog commented 9 years ago

index.md are not associated with the parent folder to display his name (and eventually a content)

The following tree is generated:

fr:
  beginner:
    index.md: /fr/beginner/index.md
    1-introduction.md: /fr/beginner/1-introduction.md
    …
  intermediate:
    index.md: /fr/intermediate/index.md
    edit-in-detail-osm.md: /fr/intermediate/edit-in-detail-osm.md

… with the following html:

Beginner
  Guide du débutant
  Introduction
  …
Intermediate
  Guides intermédiaires
  Edition avancée

But it should generate:

fr:
  beginner: /fr/beginner/index.md
    1-introduction.md: /fr/beginner/1-introduction.md
    …
  intermediate: /fr/intermediate/index.md
    edit-in-detail-osm.md: /fr/intermediate/edit-in-detail-osm.md

… with the following html:

Guide du débutant
  Introduction
  …
Guides intermédiaires
  Edition avancée
bryanbraun commented 9 years ago

Hm, I see what you're saying. Currently this gem doesn't support directory indexes. I see why it would be valuable, but it's also a pretty big change.

I'll leave this issue open since I think it's a good idea, but I'd like to prioritize some of the smaller issues first. In the mean time, you may be able to work around the issue by setting automatic_tree_updates to false and altering your tree.yml with the desired structure.

Mopster commented 9 years ago

:+1: