1. Oben Sonne
  2. poole
  3. Issues


Issue #5 wontfix

--dirhtml option

Matthieu Amiguet
created an issue

I like Sphinx's dirhtml feature: http://sphinx.pocoo.org/builders.html#sphinx.builders.html.DirectoryHTMLBuilder

In short, replace example.html with example/index.html, so the URL looks like http://www.mysite.org/example instead of http://www.mysite.org/example.html.

Attached is a quick-and-dirty (but working) implementation of this feature.

Comments (4)

  1. Oben Sonne repo owner
    • changed status to open

    Nice idea. However, I'm not sure yet if to include it. The main theme of Poole is simplicity and I wonder if so much users would appreciate such an option. Ideally there would be a possibility to manipulate pathnames in macros.py. Of course, this would require some changes in Poole too (to look for corresponding directives in macros.py), but then users could manipulate pathnames in whichever way they like. Hm .. not sure yet if this is easy/hard to implement.

  2. Matthieu Amiguet reporter

    Thanks for your answer. My first idea was to implement it through hooks in macros.py - which seemed indeed more in line with the simplicity of Poole.

    But then I realized it was both more difficult to implement in poole and required more work from the user to make it work... which defeated the simplicity goal... (That would also mean more doc, of course.)

    Anyway, I guess the patch could serve as a starting point for a hook-based implementation. If we replace the two occurrences of `if opts.dirhtml` by a test for a hook for modifying urls and/or pathnames, we could export the specific code to macros.py.

    This would be a more general solution. Should we describe it as simpler? Actually I don't know.

  3. Log in to comment