Closed tg-x closed 13 years ago
what I like:
what I don't like:
I added a few code comments
this introduces much magic. What if there exist multiple files with different extensions?
there shouldn't be multiple extensions for the same page, if the mime type is changed then the extension would change as well, but it's also not a problem if somebody creates a file with a same name but with different extension as an already existing page, because the mime type is in the attribute file from which you can determine the extension
well, we can also have a prioritized list of extensions to try if there's no attribute file, but we could just as well require an attribute file then we won't have to guess
this includes config options & fixes for the repo filename extensions
pages always have an extension now, this way the code got much simpler, we don't have two different kinds of names for the pages.
In the config you can either set an attribute file prefix (I prefer a dot because it's hidden then) or an extension. Also, I added a setting for the index page name.
Later I might improve this further to use extensions according to the mime type of the page (read from the attribute file)