tankywoo / simiki Goto Github PK
View Code? Open in Web Editor NEWSimiki is a simple wiki framework, written in Python.
Home Page: simiki.org
License: MIT License
Simiki is a simple wiki framework, written in Python.
Home Page: simiki.org
License: MIT License
如题,我想部署在自己的服务器上。
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
pip install simiki
C:\Data\Dropbox\Dev>mkdir simiki
C:\Data\Dropbox\Dev>cd simiki
C:\Data\Dropbox\Dev\simiki>simiki init
[�[1;32mINFO�[0m]: Creating directory: C:\Data\Dropbox\Dev\simiki\content
[�[1;32mINFO�[0m]: Creating directory: C:\Data\Dropbox\Dev\simiki\output
[�[1;32mINFO�[0m]: Creating directory: C:\Data\Dropbox\Dev\simiki\themes
[�[1;32mINFO�[0m]: Creating config file: C:\Data\Dropbox\Dev\simiki\_config.yml
[�[1;32mINFO�[0m]: Creating config file: C:\Data\Dropbox\Dev\simiki\fabfile.py
[�[1;32mINFO�[0m]: Creating directory: C:\Data\Dropbox\Dev\simiki\content/intro
[�[1;32mINFO�[0m]: Creating config file: C:\Data\Dropbox\Dev\simiki\content/intro/gettingstarted.md
[�[1;32mINFO�[0m]: Copying default theme to: C:\Data\Dropbox\Dev\simiki\themes
C:\Data\Dropbox\Dev\simiki>simiki new -t "Hello Simiki" -c first-catetory
[�[1;32mINFO�[0m]: Creating category first-catetory.
[�[1;32mINFO�[0m]: Creating wiki: content\first-catetory\hello-simiki.md
[�[1;32mINFO�[0m]: Done.
C:\Data\Dropbox\Dev\simiki>simiki generate
[�[1;32mINFO�[0m]: Start generating markdown files.
[�[1;32mINFO�[0m]: The output category C:\Data\Dropbox\Dev\simiki\output\first-catetory not exists, create it
[�[1;32mINFO�[0m]: The output category C:\Data\Dropbox\Dev\simiki\output\intro not exists, create it
[�[1;32mINFO�[0m]: 2 files generated.
[�[1;32mINFO�[0m]: Generate catalog page.
Traceback (most recent call last):
File "C:\Python27\Scripts\simiki-script.py", line 9, in <module>
load_entry_point('simiki==1.0.0', 'console_scripts', 'simiki')()
File "C:\Python27\lib\site-packages\simiki\cli.py", line 196, in main
gen.generate(args["--delete"])
File "C:\Python27\lib\site-packages\simiki\cli.py", line 126, in generate
self.generate_catalog(pages)
File "C:\Python27\lib\site-packages\simiki\cli.py", line 172, in generate_catalog
html = cgen.generate_catalog_html()
File "C:\Python27\lib\site-packages\simiki\generators.py", line 243, in generate_catalog_html
tpl_vars = self.get_template_vars()
File "C:\Python27\lib\site-packages\simiki\generators.py", line 230, in get_template_vars
self.get_content_structure_and_metadata()
File "C:\Python27\lib\site-packages\simiki\generators.py", line 226, in get_content_structure_and_metadata
return dct["content"]
KeyError: u'content'
C:\Data\Dropbox\Dev\simiki>simiki preview
[�[1;32mINFO�[0m]: Serving at port 8000
127.0.0.1 - - [10/Jun/2014 19:58:26] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [10/Jun/2014 19:58:27] code 404, message File not found
127.0.0.1 - - [10/Jun/2014 19:58:27] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [10/Jun/2014 19:58:31] "GET /first-catetory/ HTTP/1.1" 200 -
127.0.0.1 - - [10/Jun/2014 19:58:33] "GET /first-catetory/hello-simiki.html HTTP/1.1" 200 -
127.0.0.1 - - [10/Jun/2014 19:58:33] code 404, message File not found
127.0.0.1 - - [10/Jun/2014 19:58:33] "GET /static/css/style.css HTTP/1.1" 404 -
127.0.0.1 - - [10/Jun/2014 19:58:33] code 404, message File not found
127.0.0.1 - - [10/Jun/2014 19:58:33] "GET /static/css/tango.css HTTP/1.1" 404 -
[�[1;32mINFO�[0m]: Shutting down server
[�[1;32mINFO�[0m]: Done.
C:\Data\Dropbox\Dev\simiki>simiki generate
[�[1;32mINFO�[0m]: Start generating markdown files.
[�[1;32mINFO�[0m]: 2 files generated.
[�[1;32mINFO�[0m]: Generate catalog page.
Traceback (most recent call last):
File "C:\Python27\Scripts\simiki-script.py", line 9, in <module>
load_entry_point('simiki==1.0.0', 'console_scripts', 'simiki')()
File "C:\Python27\lib\site-packages\simiki\cli.py", line 196, in main
gen.generate(args["--delete"])
File "C:\Python27\lib\site-packages\simiki\cli.py", line 126, in generate
self.generate_catalog(pages)
File "C:\Python27\lib\site-packages\simiki\cli.py", line 172, in generate_catalog
html = cgen.generate_catalog_html()
File "C:\Python27\lib\site-packages\simiki\generators.py", line 243, in generate_catalog_html
tpl_vars = self.get_template_vars()
File "C:\Python27\lib\site-packages\simiki\generators.py", line 230, in get_template_vars
self.get_content_structure_and_metadata()
File "C:\Python27\lib\site-packages\simiki\generators.py", line 226, in get_content_structure_and_metadata
return dct["content"]
KeyError: u'content'
C:\Data\Dropbox\Dev\simiki>
Hello, I'm doing some work to add disqus into simiki, but I found there is no enough api for me to use.
For example, the url for current page, the identifier for an article.
And can I get the title for page with page.title
?
I get all the info from http://simiki.org/docs/variables.html and http://simiki.org/docs/metadata.html .
Please let me know if I missed anything.
出错如下:
➜ wiki git:(master) simiki
Traceback (most recent call last):
File "/usr/local/bin/simiki", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: paramiko>=1.10
I install simiki via pip on my Mac OSX box, and I got these error when init a mywiki
directory under ~/坚果云
➜ mywiki pwd
/Users/xcy/坚果云/mywiki
➜ mywiki simiki init
[ERROR]: 'ascii' codec can't decode byte 0xe5 in position 11: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/simiki/cli.py", line 215, in main
isite.init_site()
File "/usr/local/lib/python2.7/site-packages/simiki/initsite.py", line 82, in init_site
theme_path = os.path.join(self.target_path, "themes")
File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 11: ordinal not in range(128)
It works fine if there is no Chinese in path
➜ mywiki mkdir /tmp/mywiki
➜ mywiki cd /tmp/mywiki
➜ mywiki simiki init
[INFO]: Creating directory: /private/tmp/mywiki/content
[INFO]: Creating directory: /private/tmp/mywiki/output
[INFO]: Creating directory: /private/tmp/mywiki/themes
[INFO]: Creating config file: /private/tmp/mywiki/_config.yml
[INFO]: Creating config file: /private/tmp/mywiki/fabfile.py
[INFO]: Creating directory: /private/tmp/mywiki/content/intro
[INFO]: Creating config file: /private/tmp/mywiki/content/intro/gettingstarted.md
[INFO]: Copying default theme to: /private/tmp/mywiki/themes
Any suggestion?
详情可以参见: https://travis-ci.org/Xuanwo/CLIWiki/builds/107248176
下面为对应的 Traceback
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.4.2/bin/simiki", line 9, in <module>
load_entry_point('simiki==1.5.0.post1', 'console_scripts', 'simiki')()
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/cli.py", line 419, in main
generator.generate()
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/cli.py", line 238, in generate
self.generate_catalog(self.pages)
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/cli.py", line 270, in generate_catalog
html = catalog_generator.generate_catalog_html()
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/generators.py", line 293, in generate_catalog_html
html = self.env.get_template("index.html").render(tpl_vars)
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/jinja2/_compat.py", line 36, in reraise
raise value.with_traceback(tb)
File "/home/travis/build/Xuanwo/CLIWiki/themes/yasimple/index.html", line 1, in <module>
{% extends "base.html" %}
File "/home/travis/build/Xuanwo/CLIWiki/themes/yasimple/base.html", line 24, in <module>
{% block container %}
File "/home/travis/build/Xuanwo/CLIWiki/themes/yasimple/index.html", line 12, in <module>
{% for category_name, pages in site.structure.iteritems() %}
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute 'iteritems'
环境,centos6 64bit python2.6
报错信息:
File "/usr/bin/simiki", line 8, in
load_entry_point('simiki==1.0.3', 'console_scripts', 'simiki')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 318, in load_entry_point
def get_metadata_lines(name):
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2221, in load_entry_point
"""Return a Requirement
that matches this distribution exactly"""
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 1954, in load
return entry
File "/usr/lib/python2.6/site-packages/simiki/cli.py", line 38, in
from simiki.generators import (PageGenerator, CatalogGenerator,
File "/usr/lib/python2.6/site-packages/simiki/generators.py", line 23, in
from simiki import utils
File "/usr/lib/python2.6/site-packages/simiki/utils.py", line 45
allowed_extensions = {".md", ".mkd", ".mdown", ".markdown"}
^
SyntaxError: invalid syntax
调试的主题的时候, simiki generate
不会把 theme/xxx/*.css
拷贝到 output
中,所以实际上用的还是原来主题的 css 文件。但是重新生成文件的时候,用的是新主题目录下的模板文件。
很不方便,相当于修改主题需要改两个地方。新主题下的模板文件 && output/*css 。
调用 SimpleHTTPServer 实现本地预览功能
我看了官方文档,并没有发现关于simiki功能的介绍。比如支持多少层目录,是否不同页面之间相互引用。希望能有一个官方全面的功能介绍。
我现在用的是gitit,但作者不怎么有时间维护。但就gitit所实现的功能而言还是很棒的。
好吧,我承认是有点强迫症了,在
simiki p
预览页面时发现"GET /favicon.ico HTTP/1.1" 404 -
……
目前我是这么改的:ferstar@1c5655f
然后就可以把 favicon.ico 推送到 gh-pages 上面。不过这个方法看上去略挫,希望 @tankywoo 能做个高大上的解决方案出来。
比如源文件中存在: http://www.google.com,wiki 页面不能显示为超链接。
猜测是 markdown 引擎的问题,如何更换 markdown 引擎?
本想把 content 保存在 github 上,然后每次 git pull
,就可以了。后来发现 .git 文件会被认为是一种文章目录。
在解析的时候时候有必要过滤掉隐藏文件?
看到tankywoo的页面能讲markdown 的标题自动生成目录在右上角。这个feature可否加入到simiki啊。
当目录为中文时,生成错误:
Traceback (most recent call last):
File "/usr/local/bin/simiki", line 9, in <module>
load_entry_point('simiki==1.2.1', 'console_scripts', 'simiki')()
File "/usr/local/lib/python2.7/dist-packages/simiki/cli.py", line 234, in main
gen.generate(args["--delete"])
File "/usr/local/lib/python2.7/dist-packages/simiki/cli.py", line 135, in generate
pages = self.generate_all_pages()
File "/usr/local/lib/python2.7/dist-packages/simiki/cli.py", line 148, in generate_all_pages
d for d in dirs if not d.decode("utf-8").startswith(".")
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Simiki version: 1.2.1
os: ubuntu 14.04 64
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.7 -c src/MD2.c -o build/temp.linux-x86_64-2.7/src/MD2.o
src/MD2.c:31:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-SIvXZ0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pycrypto
Storing debug log for failure in /home/yuansc/.pip/pip.log
The current requirements.txt
does not specify exact versions ( ==0.0.X
and so on) and does not specify versions at all. This means a new release of one of those dependencies could break an installation of this project (due to breaking changes).
simiki/generators.py:261: idx_mfile = osp.join(os.path.abspath(self.site_settings["source"]), fn)
It is easy to confuse
某种情况下失败,应该给予用户正确的反馈,而不是直接exit(1).
正确的做法抛出异常, 并编写测试,验证这个异常。
simiwi not found on linux after pip3 install simiki?
如果能支持Mathjax就更好了
是不是应该加个搜索功能?
操作系统:Ubuntu 14.04.3 x64
以下是错误内容:
[INFO]: Start generating markdown files.
[INFO]: 84 files generated.
[INFO]: Generate catalog page.
Traceback (most recent call last):
File "/usr/local/bin/simiki", line 9, in <module>
load_entry_point('simiki==1.5.0-1', 'console_scripts', 'simiki')()
File "/usr/local/lib/python3.4/dist-packages/simiki-1.5.0_1-py3.4.egg/simiki/cli.py", line 419, in main
generator.generate()
File "/usr/local/lib/python3.4/dist-packages/simiki-1.5.0_1-py3.4.egg/simiki/cli.py", line 238, in generate
self.generate_catalog(self.pages)
File "/usr/local/lib/python3.4/dist-packages/simiki-1.5.0_1-py3.4.egg/simiki/cli.py", line 270, in generate_catalog
html = catalog_generator.generate_catalog_html()
File "/usr/local/lib/python3.4/dist-packages/simiki-1.5.0_1-py3.4.egg/simiki/generators.py", line 293, in generate_catalog_html
html = self.env.get_template("index.html").render(tpl_vars)
File "/usr/local/lib/python3.4/dist-packages/Jinja2-2.7.3-py3.4.egg/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.4/dist-packages/Jinja2-2.7.3-py3.4.egg/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.4/dist-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_compat.py", line 36, in reraise
raise value.with_traceback(tb)
File "/home/ferstar/wiki/themes/yasimple/index.html", line 1, in <module>
{% extends "base.html" %}
File "/home/ferstar/wiki/themes/yasimple/base.html", line 17, in <module>
{% block container %}
File "/home/ferstar/wiki/themes/yasimple/index.html", line 12, in <module>
{% for category_name, pages in site.structure.iteritems() %}
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute 'iteritems'
if i use tag in post, then run "simiki g", this error will show up.
/usr/local/lib/python3.5/site-packages/tzlocal/darwin.py:8: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='UTF-8'>
tzname = os.popen("systemsetup -gettimezone").read().replace("Time Zone: ", "").strip()
(most recent call last):
File "/usr/local/bin/simiki", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/simiki/cli.py", line 401, in main
generator.generate(include_draft=args['--draft'])
File "/usr/local/lib/python3.5/site-packages/simiki/cli.py", line 178, in generate
self.generate_tags()
File "/usr/local/lib/python3.5/site-packages/simiki/cli.py", line 214, in generate_tags
meta, _ = g.get_meta_and_content(do_render=False)
File "/usr/local/lib/python3.5/site-packages/simiki/generators.py", line 135, in get_meta_and_content
meta = self.parse_meta(meta_str)
File "/usr/local/lib/python3.5/site-packages/simiki/generators.py", line 221, in parse_meta
if isinstance(meta['tag'], basestring):
NameError: name 'basestring' is not defined
安装步骤如下
pip
pip install simiki
时出错.错误日志
building 'Crypto.Random.OSRNG.winrandom' extension
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastm
ath.
error: Unable to find vcvarsall.bat
----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:
\\users\\zhajiang\\appdata\\local\\temp\\pip-build-lkn2u8\\pycrypto\\setup.py';e
xec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n
'), __file__, 'exec'))" install --record c:\users\zhajiang\appdata\local\temp\pi
p-cuyemz-record\install-record.txt --single-version-externally-managed --compile
" failed with error code 1 in c:\users\zhajiang\appdata\local\temp\pip-build-lkn
2u8\pycrypto
我想问一下,目前有什么方便的办法在md中添加内链么?我目前是把它当做普通链接添加,如果能够实现像wikipedia那样内链编写方式就好了。
环境:Mac OS 10.9.3
版本:1.0.1
堆栈信息:
Traceback (most recent call last):
File "/private/var/www/wiki.hustlzp.com/venv/bin/simiki", line 9, in
load_entry_point('simiki==1.0.1', 'console_scripts', 'simiki')()
File "/private/var/www/wiki.hustlzp.com/venv/lib/python2.7/site-packages/simiki/cli.py", line 196, in main
gen.generate(args["--delete"])
File "/private/var/www/wiki.hustlzp.com/venv/lib/python2.7/site-packages/simiki/cli.py", line 126, in generate
self.generate_catalog(pages)
File "/private/var/www/wiki.hustlzp.com/venv/lib/python2.7/site-packages/simiki/cli.py", line 172, in generate_catalog
html = cgen.generate_catalog_html()
File "/private/var/www/wiki.hustlzp.com/venv/lib/python2.7/site-packages/simiki/generators.py", line 244, in generate_catalog_html
tpl_vars = self.get_template_vars()
File "/private/var/www/wiki.hustlzp.com/venv/lib/python2.7/site-packages/simiki/generators.py", line 231, in get_template_vars
self.get_content_structure_and_metadata()
File "/private/var/www/wiki.hustlzp.com/venv/lib/python2.7/site-packages/simiki/generators.py", line 220, in get_content_structure_and_metadata
for x in path.split('/'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 15: ordinal not in range(128)
mac os
python 2.7.11
昨晚刚刚安装了,写了两篇(感觉很棒),但今早一跑 simiki p就提示Could not listen on port 8000
①用lsof -i:8000检查了端口没有被占用
②在配置文件里配置了debug模式为true 但在preview这一步上除了以上的那条外没有更多的提示信息
本人Python小白一枚,查看源码只看懂了是捕捉到了OSError 或IOError @-@
望作者能给予帮助
谢谢
May be test file is too old, they can not be passed.
gitbook的体验太烂
遂直接在content 目录放入了一个gitbook库,
执行simiki g
毋庸质疑error
看报错信息,应该是在匹配每个文件开头的
---
layout: page
title: ""
date:
---
如果md文档中没包含即error
不知是否有其他技巧批量添加?
感觉可以支持一下自动生成atom.xml之类的以便于支持RSS订阅和站点地图~
When I use simiki p to preview my wiki in broswer, found that watchman is great for auto generate wiki output.
I write my script down here, not sure how to add it to this project , hope it will be helpful.
Have tested with OSX , and linux will work , cause facebook watchman is cross-platform.
brew install watchman
cd mywiki
watchman-make -p 'content/**/*.md' --make=/usr/local/bin/simiki -t g
图片引用功能用不了吗?
1, 在_config.yml
中设置default_ext: mkd
,而content
目录下如果包含有.md
和mkd
文件,则生成过程中出错。如下:
(env) mellon wiki $ simiki generate
[INFO]: Start generating markdown files.
[INFO]: 8 files generated.
[INFO]: Generate catalog page.
Traceback (most recent call last):
File "/home/mellon/GitHub/wiki/env/bin/simiki", line 9, in <module>
load_entry_point('simiki==1.2.1', 'console_scripts', 'simiki')()
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/cli.py", line 234, in main
gen.generate(args["--delete"])
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/cli.py", line 136, in generate
self.generate_catalog(pages)
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/cli.py", line 194, in generate_catalog
html = cgen.generate_catalog_html()
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/generators.py", line 259, in generate_catalog_html
tpl_vars = self.get_template_vars()
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/generators.py", line 246, in get_template_vars
self.sort_structure(self.get_content_structure_and_metadata())
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/generators.py", line 241, in sort_structure
sorted_structure[k] = self.sort_structure(sorted_structure[k])
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/generators.py", line 241, in sort_structure
sorted_structure[k] = self.sort_structure(sorted_structure[k])
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/generators.py", line 241, in sort_structure
sorted_structure[k] = self.sort_structure(sorted_structure[k])
File "/home/mellon/GitHub/wiki/env/lib/python2.7/site-packages/simiki/generators.py", line 234, in sort_structure
for k, v in sorted_structure.items():
AttributeError: 'str' object has no attribute 'items'
2, 如果设定default_ext: mkd
选项,而content
目录下全部是.mkd
文件的话,生成的index.html
不含有任何链接。部分index.html
代码如下:
<h2 id="misc">misc</h2>
<ul>
<li class="pagelist">
<a href="./misc/.html"></a>
</li>
</ul>
RT
本地文件夹命名为VPS,deploy到服务器后就成小写的vps了。
目前的状况是使用目录文件夹的名字作为 url 和 目录名,导致的问题是如果想要使用中文目录名的话会对 url 不友好。是否考虑将目录名与 url 分离。
每次执行generate的时候,应该把之前删除的wiki, 相应的html也删除掉。
你可以在本地试一下,看一下效果就明白了。
是 BUG,还是设计上就是这样的?
Hi,在使用simiki generate
时,会全部重新生成output下的文件,这样就不能单独deploy gh-pages
分支,每次都要重新init,添加remote提交,请问有什么解决方案吗?
python3.5 on windows10.
pip 安装依赖的时候遇到了问题,是 pyyaml 和 PyCrypto
下载的第三方编译:
pyyaml: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml
PyCrypto: https://github.com/sfbahr/PyCrypto-Wheels
然后终于把 simiki 装好了……
然而……cmd 运行 simiki
报 failed to create process.
L163这里会漏掉两种情况:
#1. 有文件被删除 git status --porcelain命令结果前两位字符应该是
空格+D
#2. 新添加的文件没有被追踪 git status --porcelain 输出前两位字符是
??
#3. 有文件被修改
空格+M
需要稍微修改下正则,匹配到前两种情况
res = local('git status --porcelain 2>/dev/null | egrep \'^ [DM]|^\?\?\' | wc -l', capture=True)
然后检测到有改动执行git add -A
后
L169这里会漏掉三种情况
#1. 文件被重命名
R+空格
#2. 文件被删除
D+空格
#3. 有新文件
A+空格
#4. 文件被修改
M+空格
需要修改下正则,匹配到前三种情况
res = local('git status --porcelain 2>/dev/null | egrep \'^[ADMR]\' | wc -l', capture=True)
➜ mywiki simiki init
Traceback (most recent call last):
File "/usr/local/bin/simiki", line 9, in
load_entry_point('simiki==1.5.1', 'console_scripts', 'simiki')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/Library/Python/2.7/site-packages/simiki/cli.py", line 53, in
from simiki.generators import (PageGenerator, CatalogGenerator, FeedGenerator)
File "/Library/Python/2.7/site-packages/simiki/generators.py", line 23, in
from jinja2 import (Environment, FileSystemLoader, TemplateError)
File "/Library/Python/2.7/site-packages/jinja2/init.py", line 33, in
from jinja2.environment import Environment, Template
File "/Library/Python/2.7/site-packages/jinja2/environment.py", line 14, in
from jinja2.defaults import BLOCK_START_STRING,
File "/Library/Python/2.7/site-packages/jinja2/defaults.py", line 32, in
from jinja2.tests import TESTS as DEFAULT_TESTS
ImportError: cannot import name TESTS
simiki默认使用simple主题,如果开发者为simple定制了几套不同的主题,并且放入simiki源码的themes文件中,貌似现在simiki没有什么机制能够自动在gen的时候将这个主题copy过来,需要手工cp到生成的wiki themes文件夹中。
cli或者配置中应该添加某个命令实现这件事情。
主题可以在哪里下载的到?
0.1.0 的时候用的貌似是 python - markdown,现在用的是标准 markdown 吗?
Wiki本质是用于知识管理,那么就免不了需要index和搜索,index现在有了,搜索是不是~~~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.