claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 185 forks source link

Support pages in subdirectories #108

Open rjarry opened 8 years ago

rjarry commented 8 years ago

I know this is indicated in the known limitations:

  • The repository is "flat" (no directories or namespaces)

Would it be complex to add the support for putting pages in subdirectories? (Gollum supports this already.)

I tried pickling with the code but I have to admit that this touches too much parts and I break everything trying to do it.

claudioc commented 8 years ago

Hi Robin,

I didn't implemented that feature because it can create some edge cases and I didn't have a valid use case for that. What kind of problem are you trying to solve?

rjarry commented 8 years ago

Hi Claudio,

I plan to migrate an existing plone cms with a lot of content to a more modern and faster wiki. In the plone instance there are a lot of pages with the same name but in different directories.

Also, when editing/browsing the source files after a git clone, having subdirectories helps a lot for categorizing pages.

What are the edge cases you are talking about?

By the way, I have been using jingo for a few days and it rocks! Congratulations for such a good job!

almereyda commented 8 years ago

@robin-jarry Could you point out some documentation or code from Gollum where this feature is betalked? I am unable to find any reference.

In experiences with http://django-wiki.org, I can only tell having a flat namespace helps a lot not to confuse layers of abstraction. An edge case would for example be to move a page from one folder to the other and update all related links. Or would you also want to keep redirect rules? There is a lot to consider.

This is not to be confused with :link: Subpages in Gollum, which are despite the Header one, already implemented in Jingo.

Even with a flat namespace you can create virtual navigation layers with those. http://realms.io doesn't do any different. Neither does the http://federated.wiki.

rjarry commented 8 years ago

@almereyda on the link about subpages you posted, it is specifically mentioned:

Subpages affect all pages in their directory and any subdirectories that do not have a subpage of their own.

Here is another example from gollum source code that pages in subdirectories are supported: https://github.com/gollum/gollum/blob/master/lib/gollum/public/gollum/javascript/gollum.js#L213

Another git-based wiki: Gitit also supports this.

As for the necessity of this feature, it depends on what you use the wiki for. My thinking is that organizing is easier when you can put pages in sub folders. Like for a file-system, you don't store every file of a Linux installation in /, do you? :-)

About page renaming/move, I personally don't really care about redirections but that would be a cool feature. Not crucial if you ask me.

dandv commented 7 years ago

I would also like directories (use case: migrating a large MojoMojo wiki), and/or even better, tags for pages.

MatthiasKauer commented 7 years ago

@almereyda You write:

Even with a flat namespace you can create virtual navigation layers with those. http://realms.io doesn't do any different. Neither does the http://federated.wiki.

Does that mean that the restriction of a flat hierarchy is only with the actual file system? Can I have namespaces (or categories or whatever you want to call it) within the wiki after all?

almereyda commented 7 years ago

Well, you can always build your own (nested) navigation within _sidebar.md or _footer.md .

On 13 September 2016 at 20:33, MatthiasKauer notifications@github.com wrote:

@almereyda https://github.com/almereyda You write:

Even with a flat namespace you can create virtual navigation layers with those. http://realms.io doesn't do any different. Neither does the http://federated.wiki.

Does that mean that the restriction of a flat hierarchy is only with the actual file system? Can I have namespaces (or categories or whatever you want to call it) within the wiki after all?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/claudioc/jingo/issues/108#issuecomment-246778512, or mute the thread https://github.com/notifications/unsubscribe-auth/ABka_A3IyCO3LuPkvBuo9cJCqwdEbBShks5qpux2gaJpZM4Gk7Kb .

ghost commented 7 years ago

We already have a git repository which has a folder-based structure. I would gladly use jingo for that repo, but I don't want to miss the folder structure...

almereyda commented 7 years ago

In fact, what http://progrium.viewdocs.io/viewdocs/ does.

On 11 January 2017 at 21:52, leo90skk notifications@github.com wrote:

We already have a git repository which has a folder-based structure. I would gladly use jingo for that repo, but I don't want to miss the folder structure...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/claudioc/jingo/issues/108#issuecomment-271990752, or mute the thread https://github.com/notifications/unsubscribe-auth/ABka_E_bPXP5cVw9SWQFJQOB6DaB0UTXks5rRUERgaJpZM4Gk7Kb .

9n commented 7 years ago

Is there any plan on this?

claudioc commented 7 years ago

I am thinking about it now, since there is apparently a lot of interest on the topic