minad / olelo

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

attribute file name #29

Closed tg-x closed 14 years ago

tg-x commented 14 years ago

I suggest to name the attribute files .PageName instead of PageName/attributes, this way we can avoid moving the PageName file to PageName/content if attributes are added, also the repository structure looks better this way, reflects the page paths better and there are no unnecessary directories just for storing some attributes

for the index/root page we could use a page called Index with its attributes in .Index

tg-x commented 14 years ago

another idea related to this is that a page file name could contain an extension, e.g. when looking for a page called PageName we could first look up the attributes in .PageName which specifies the mime type, e.g. text/x-orgmode, from that the extension can be determined easily, in this case PageName.org

this way local editing is more convenient as text editors usually determine the file type from the extension (also when doing an ls the file type could be seen right away)

minad commented 14 years ago

Think about the versioning. If a folder is used the attributes and the content share the same history. Otherwise this would be more complicated. But patches are always welcome.

Another option: It is possible to implement a custom repository backend with your own layout.

NathanNeff commented 14 years ago

I also vote for keeping the filename. I plan to use a text editor to make most of my changes, and if I have 3-4 files named "content" open in my text editor, it would get confusing quickly.

As for versioning, if you kept the attributes in a separate file, you would still know what file the attributes pertain to, merely by the filename (.foo.org.properties pertains to foo.org).

tg-x commented 14 years ago

NathanNeff: exactly, I also prefer using a text editor, and this would make it much easier & usable

minad: what would be the complications in your opinion? can't you just read the attribute file belonging to the page?

minad commented 14 years ago

try ac4393fd774dd19d40b74e6c264a89a38425b0b9

tg-x commented 14 years ago

i've made some improvements on this, i'll post a patch soon

tg-x commented 14 years ago

http://github.com/minad/olelo/pull/37