Zelphir Kaltstahl 0f1f0782b8 remove rst files | před 6 roky | |
---|---|---|
static | před 6 roky | |
templates | před 6 roky | |
.gitignore | před 6 roky | |
Dockerfile | před 6 roky | |
FileReader.py | před 6 roky | |
LICENSE | před 6 roky | |
Link.py | před 6 roky | |
README.md | před 6 roky | |
RSTRenderer.py | před 6 roky | |
WikiProcessor.py | před 6 roky | |
__init__.py | před 6 roky | |
log.conf | před 6 roky | |
rst_directive.py | před 6 roky | |
server.py | před 6 roky |
Zwiki is a static wiki system based on reStructuredText files.
Rendering reStructuredText files is a very flexible approach to generating wiki pages, because of reStructuredText's expressiveness and extensibility. It's expressive ways to write references (see http://docutils.sourceforge.net/docs/user/rst/quickref.html#hyperlink-targets) surpass those of basic Markdown's (see https://daringfireball.net/projects/markdown/syntax#link) by far. In context of wiki systems especially document internal links and wiki internal links are of importance.
Depending on how you wish to run Zwiki, dependencies vary. If you want to run Zwiki as a Docker container, the dependency will be Docker. In an uncontainerized setup the requirements will include libraries Zwiki depends on.
Zwiki depends on the following libraries:
docutils
-- for translating reStructuredText to HTMLjinja2
-- for translating Jinja 2 templates to HTML pagesgunicorn
-- for running WSGI containersfalcon
-- for implementing the APIpygments
-- for rendering code blocks in Zwiki pagesThis project requires a few libraries to work. I recommend creating a fresh environment to run Zwiki:
$ conda create --name zwiki python=3.7 docutils jinja2 gunicorn pygments
$ source activate zwiki
$ conda install falcon -c conda-forge
With the environment activated, you can run Zwiki using the following command:
$ gunicorn -b 0.0.0.0:5000 main:api --log-config log.conf
(If you are developing running gunicorn
, you might consider using --reload
to have it automatically watch files of Zwiki and reload, so that no restarting is necessary to see changes.)
Then access Zwiki in your browser at http://localhost:5000/.
Simply build an image using the provided Dockerfile
and run it:
docker run -d <your-image-name>
Then access Zwiki in your browser at http://localhost:5000/.
If you run Zwiki as a Docker container, be aware of either having to rebuild the Docker image or having to modifying the Zwiki content inside the Docker container, while it is running.