scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 90 forks source link

Namespaces/Tags/Categories #35

Closed ghtyrant closed 8 years ago

ghtyrant commented 9 years ago

Do you plan on implementing namespaces (or similar features like tags or categories)? Wikis with a lot of pages can get quite messy if everything is in the same namespace.

Using sub folders in the base git repository would be the easiest way to achieve some sort of categories/namespaces, although limiting the flexibility by allowing a page to be in one category only. But imho it's the only way to reproduce the wiki's structure in the file system.

Storing this information in a page's metadata on the other hand forces realms to look into each file - meh.

What are your thoughts on this?

scragg0x commented 9 years ago

When I started, I chose to do just files in the root dir with the thought of adding directories support later. I will likely create a branch and see how much of an under taking it would be. I can't imagine it being too difficult.

As far as tags and categories, I would consider category as just a special tag. Best way is to store them in page metadata and let the application be aware of these and index them properly with the search module. Example

---
categories:
  - foo
tags:
 - bar
 - baz
---

I want to make metadata cleaner on the editor view. Such as a tab to enter in the meta data with options for tags and categories clearly defined and raw yaml of course. The server should be able to process it as it normally would (appending to top of md file). ATM it's not very newbie friendly and that the metadata is even there to be used. I hope I'm making sense.

As an aside, creating a matching .yaml file to compliment a page on the backend would be cleaner (as opposed to appending to top) but this would be something I would think about more.

loleg commented 9 years ago

I don't think it is that critical to have a metadata editor (as per #10) the editor is user friendly enough - but support for defining categories in YAML and running searches across tags or categories much more so. The metadata should be fed into the search engine for fast aggregation.

Am I right that you seem to prefer the meta-marked schema, as opposed to the MultiMarkdown and Meta-Data style, or are they all basically the same? Have you seen the interesting Maruku syntax?

Directory support would be great too, but again in my opinion a lower priority. Please spec this out and let us know if you could use any help.

scragg0x commented 9 years ago

I just use YAML. The other ones are using similar syntax. The advantage of YAML is that many already know it, it's very readable, powerful, and several libraries exist that parse it already. Imagine using multimarkdown for example, and someone wanted extra functionality and extends it. It will start looking like YAML except it won't be.

I wouldn't use Maruku. At first glance I think it goes against Markdown's philosophy of being human readable and everyone would have to learn it.

gazpachoking commented 8 years ago

:+1: for namespaces

gazpachoking commented 8 years ago

I implemented subdirs in #86. Testing and feedback are welcomed.

scragg0x commented 8 years ago

I merged the PR and did another commit. There is still one issue I have to look at. Dulwich is wigging out.

  File "/home/vagrant/.venv/lib/python2.7/site-packages/dulwich/index.py", line 338, in build_tree
    sha = build_tree(pathjoin(path, basename))
  File "/home/vagrant/.venv/lib/python2.7/site-packages/dulwich/index.py", line 334, in build_tree
    tree = Tree()
  File "/home/vagrant/.venv/lib/python2.7/site-packages/dulwich/objects.py", line 833, in __init__
    super(Tree, self).__init__()
RuntimeError: maximum recursion depth exceeded while calling a Python object
t
gazpachoking commented 8 years ago

@scragg0x Hmm, how did you get that?

gazpachoking commented 8 years ago

Can we close this now? @scragg0x ?

scragg0x commented 8 years ago

Yeah