|
2 years ago | |
---|---|---|
config | 2 years ago | |
public | 3 years ago | |
spec | 3 years ago | |
src | 2 years ago | |
.gitignore | 3 years ago | |
.travis.yml | 3 years ago | |
LICENSE | 3 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
docker-compose.yml | 3 years ago | |
shard.lock | 2 years ago | |
shard.yml | 2 years ago |
Wiki in crystal and markdown
The pages of the wiki are written in markdown and committed on the git repository where it is started.
Verify that you have crystal v0.26.1 or greater installed, as well as shards and git.
git clone https://github.com/Nephos/wikicr.git
cd wikicr
make test
make
./wikicr --port 3000
A directory meta/
should be created into wikicr.
It must contains several files and directories (acl, index, users, ...).
You may want to save this directory because it contains meta-data about the pages.
Another data/
should be a git repository (initialized at the first start).
Those files are the ALL the "displayed data" of the wiki.
Simply edit the page to remove and delete all the content. The page will be deleted completely.
A special markdown (wikimd) is used in the pages. It provides several interesting features:
An internal link will search through the index of pages to find a matching one and render a valid link to it.
blabla [[my page]] blabla
Don't hesitate to open an issue, I'm always happy to discuss about my projects or include other developers than me.
For now, there is no "important" core operation to add (they are all already implemented). However, there are still lots of improvements to write on the current implementation, documentation, security check, error management and consistency of the code.
At the beginning, I tried to used libgit2. However, it seems to be a bad idea because the lib was not documented (no tutorial or at least not up-to-date, API not very well documented, etc.) so I want to write a little git-* wrapper to handle some operations (add, commit, revert, etc.).
It is not something very likely to be done first (even if it's a lot of important
features) because it is boring and requires to take care of the security issues.
I must have to replace the "system" calls (in backquote) with Proccess.new.run
.
There is some important features in order to have a good interface and a fluent wiki experience. That's not the stuff I prefer because it requires some css/js (front-end stuff).
There is also work around string matching to write a valid research engine. This is the most important feature to add right now.
The current implementation of Markdown in crystal is limited and may be fully rewritten with more standard features in some weeks or months. For now, I choose to use Markd, another markdown parser, and wrote a wikimd wrapper (Wikicr::Page::Markdown). It allows me to expand the default markdown by writting HTML inside the markdown to render.
The rest is boring stuff (code factorization, make everything configurable, document the code, add a lot of specs, ...).