Write wiki in markdown-lang.Support fenced code , code highlighting, template, etc.
Input : Markdown-Syntax source files
Output : html files
- fenced code syntax(Github style)
- code highlighting (require pygments)
- template
- cache (mkdwiki will ignore not modified src files)
- generate table of head lines support
if python in your system is called 'python2', you need to edit src/mkdwiki.py 's shebang to:
#!/usr/bin/env python2
install:
git clone https://github.com/hit9/mkdwiki
cd mkdwiki
sudo python setup.py
setup manually:
cp src/mkdwiki.py to /usr/bin/mkdwiki and chmod it:
sudo chmod u+x /usr/bin/mkdwiki
cp src/fenced_code_hilite.py to dir-of-python-markdown-module/extensions/.that's all.
mkdwiki <src-path> -o <out-path>
src-path:a single file or dir
out-path:a single dir
中文wiki在目录wiki/src/
下有源文件,安装mkdwiki后:
cd wiki
make
输出的html格式的wiki在wiki/html/
下
中文在线wiki:http://hit9.github.com/wiki/mkdwiki/index.html
-
press key 'm' to see github's markdown cheat sheet!
-
how to figure out page's title in source file
%title Hello world
mkdwiki will use input-path/tpl.html as template .a sample template:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>%title%</title>
<link rel="stylesheet" href="%html_root%style.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="%html_root%code-style.css" type="text/css" media="screen" charset="utf-8">
</head>
<body>
%content%
</body>
</html>
mkdwiki hash 3 stylesheets in path pygments-styles/
You can find a lot here : https://github.com/richleland/pygments-css
Recommend a css:(solarized in vim):https://github.com/hit9/mkdwiki/blob/master/tests/html_output/code-style.css
in your source file:
[TOC]
rm <input-path>/.mkdwiki.cache~
mkdwiki will ignore these file's name:
file in '.mkdwikiignore' (your can write *.mkd etc.)
and these file's path:
input-path/tpl.html, input-path/.mkdwiki.cache~