minad / olelo

Wiki with git backend
MIT License
241 stars 44 forks source link

repository: filename extensions #37

Closed tg-x closed 13 years ago

tg-x commented 13 years ago

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)

minad commented 13 years ago

what I like:

what I don't like:

I added a few code comments

tg-x commented 13 years ago
minad commented 13 years ago

this introduces much magic. What if there exist multiple files with different extensions?

tg-x commented 13 years ago

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