Simiki
Host on github(using project pages)
we need ghp-import to help us do it more efficiently.
Usage: ghp-import [OPTIONS] DIRECTORY Options: -n Include a .nojekyll file in the branch. -m MESG The commit message to use on the target branch. -p Push the branch to origin/{branch} after committing. -r REMOTE The name of the remote to push to. [origin] -b BRANCH Name of the branch to write to. [gh-pages] -h, --help show this help message and exit
once you have generate your wiki, pushing the static files to github is esay:
$ pip install ghp-import $ ghp-import -p output
you can visit your site via https://USERNAME.github.io/PROJECT_NAME after
about ten minutes.
if you don't use a custom domain, set root to /PROJECT_NAME in
_config.yml, and when you want to preview at local, please use
simiki generate --ignore-root, otherwise the css doesn't work at local;
if you use your own custom domain, you don't need to do anything at all,
add a 'CNAME' file to the output directory is enough.
ralated problems:
use custom subdomaian
if you want to use your own domain, create a CNAME file under the output
directory:
wiki.lord63.com
then:
$ ghp-import -p output
In cooperation with your DNS provider, create a CNAME record that points
from that domain to USERNAME.github.io. Your DNS changes can take up to a
full day to propagate.
Host on vps(using nginx)
create a configure file named wiki.lord63.com.conf under /etc/nginx/conf.d/
server { listen 80; server_name wiki.lord63.com; root /path/to/the/output_dir; index index.html index.htm; location / { index index.html; } } $ sudo nginx -t # check whether the config file is ok or not $ sudo service nginx reload
Tips
你可以使用 FreeFileSync 的 RealtimeSync 来监控 content 目录,一旦有改动就
generate 一次,使用 supervisor 来实现开机启动和后台运行。