This wiki is designed to work with self-hosted knowledge management, i.e., all pages are located in a local folder wiki
, and this fold is synchronised with a cloud-driver across different machines.
Usage:
git clone https://github.com/fengwang/minimal-wiki.git
cd minimal-wiki
virtualenv .
source ./bin/activate
pip3 install -r ./requirements.txt
pip3 install https://github.com/fengwang/markdown/archive/master.zip --upgrade
python3 ./wiki.py&
- build an docker image with name
c-wiki
:
git clone https://github.com/fengwang/minimal-wiki.git
cd minimal-wiki
docker build -t c-wiki .
- run a container with name
wiki
, exposing port8895
and storing wiki items folder/cache/data/wiki
:
docker run -p 8895:8895 -v /cache/data/wiki:/wiki --name wiki -d c-wiki
- copying starting file
home.md
and default folderwiki/images
to/cache/data/wiki
:
cp -r ./wiki /cache/data/wiki
Links to local images are possible.
It is highly recommanded to place your images in folder ./wiki/images/
.
To refer a local image ./wiki/images/cat.jpg
, the desired Markdown code is
![](./images/cat.jpg)
The code are highlighted with prismjs, all the supported languages are list here.
To highlight a C++ code snipnet, the Markdown code is
```language-cpp
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
```
MathJax is employed to generate equations, example:
\\[x = \\frac{-b \\pm \\sqrt{b^2-4ac} }{2a}\\]
And the inline equation is generated via
\\(x = \\frac{-b \\pm \\sqrt{b^2-4ac} }{2a}\\).