`

MoinMoin的初始化设置

阅读更多
注册和修改用户配置
登录到MoinMoin首页,点击登录,注册新用户;
用户注册完毕需要点击'清除此提示信息'链接, 否则可能不能成功注册.
用户的配置文件在[moin-desktop]\moin-desktop\wiki\data\user目录下,以纯文本方式保存,可以手工修改.

修改站点名称
在[moin-desktop]/moin-desktop/wikiconfig.py中,修改:
class Config(DefaultConfig):   
    sitename = u"BaoMW\u7684\u77E5\u8BC6\u7BA1\u7406"

如果是中文,需要通过\u的编码转换.

以上内容前加u"...", 表示是unicode编码,'\u7684\u77E5\u8BC6\u7BA1\u7406'是中文的知识管理,需要自行解决,比如使用java的native2ascii;

修改提交次数的限制
wikiconfig.py中, 增加:
class Config(DefaultConfig):   
...   
    surge_action_limits = { 'default': (100, 1) } # max. 100 requests in 1 second   
    surge_lockout_time = 60 # secs you get locked out when you ignore warnings

...  
以上配置提交的限制,默认情况下提交多次后会提示要间隔一段时间才能再提交.

本地化配置
系统页面和帮助的中文化

访问: http://localhost:wiki_port/SystemPagesSetup,其中wiki_port是moinmoin的端口号,如果没有自行配置,默认是8080.

在SimplifiedChinese行上, 点击'安装'链接即可,这时moinmoin的界面和帮助已经中文化(不需下载).

时区的修改

moinmoin默认使用格林威治标准时间,国内市区是东8区,比标准时间早8小时(+8).
如果不修改, 时间戳很别扭.
修改办法:用户登录后点击'用户设置'链接,在时区选择....[+08:00]的选项即可;


定制页面风格

Marshal Wu一般选用modern风格,并在此基础上修改了css样式,在[moin-desktop]\moin-desktop\wiki\htdocs\modern\css目录下.

定制首页

Marshal Wu定制的首页:

||"100%">||   
||<^25%> [[Include(工作文档)]] ||<^30%>  [[Include(生活文档)]] [[BR]] [[Include(学习文档)]]||<^> [[Include(任务导航)]] [[BR]] [[Include(备忘录)]]||
 

第一行表示要使用整个浏览器宽度.
第二行是页面的布局,其中工作文档,生活文档...都是站内连接;

Incluede是moinmoin的宏,表示包含页面;
具体解释,参见moinmoin的帮助文档有关宏的部分.

在标题下增加左侧标题线和虚线的CSS

将以下CSS代码增加到{moin-desktop}\wiki\htdocs\modern\css\common.css文件中(modern代表个人所选用的主题):
/*定义标题CSS样式*/
#title { 
 border: 0px dashed  #ddd; 
 margin-left : 1.6em; 
 font-family: Georgia,Tahoma,SimSun,serif;
 font-weight: lighter;
}

h1 a, h1 a:visited {
	text-decoration: none;    
	color: black;
}
/*color:#336699*/
H1,H2,H3,H4,H5,H6{
 margin-left : 0px 0px 5px 0px;
 color:#333333;
 padding : 4px;
 font-family: Tahoma,SimHei,SimSun,Georgia,serif;
 font-weight: lighter; 
 line-height: 1.2em;
}

/*border: 0px dashed  #ddd; 
background-color :transparent;*/
h1 { 
	font-size: 1.5em;
	font-weight: bold; 
 border-left : 5px solid #204070 ;
 border-bottom : 1px dashed  #204070 ;
}
h2 { 
 border-left : 5px solid #204070 ;
 border-bottom : 1px dashed  #204070 ;
 font-size: 1.4em;
}
h3 {
 border-left : 5px solid #336699 ;
 border-bottom : 1px dashed  #336699 ;
 font-size: 1.3em;
}

h4 {	
 border-left : 5px solid #3399CC ;
 border-bottom : 1px dashed  #3399CC ;
 font-size: 1.2em;
}
h5{	
 border-left : 5px solid #89CEFA ;
 border-bottom : 1px dashed  #89CEFA ;
 font-size: 1.1em;
}
h6{	
 border-left : 5px solid #183868 ;
 border-bottom : 1px dashed  #183868 ;
 font-size: 1.1em;
}


打开标题行自动编号功能默认值
使用记事本打开{moin-desktop}/wikiconfig.py文件,将下列代码增加到最后一行即可打开标题行自动编号功能默认值:
show_section_numbers = 1;


注意事项
尽量使用英文文件和目录名称, 中文文件名有时因为编码过长而出错

此技术文章来源于Marshal Wu(http://marshal.iteye.com/),吴老师是我在开发行业一位非常重要的老师.
分享到:
评论
3 楼 winix 2007-12-26  
guotie 写道
如何得到superuser的权限

在 wikiconfig.py 里
superuser = [u"username", ]
2 楼 sc_1028 2007-12-25  
不好意思,这么久才回,关于MOINMOIN我也才用了不久,不会一直坚持用,帮我总结了不少东西,关于你说的superuser,我查了一些帮助,我怀疑他并不是我们想象的那样可以设置superuser,而是通过我们每页面不同的定义权限来控制访问和修改的功能,你可以查看moinmoin的帮助来查具体使用方法.http://localhost:8080/%E5%B8%AE%E5%8A%A9-%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90%E6%8E%A7%E5%88%B6%E8%A1%A8?highlight=%28%E7%BB%84%29
1 楼 guotie 2007-12-18  
如何得到superuser的权限

相关推荐

Global site tag (gtag.js) - Google Analytics