Differences between revisions 1 and 2
Revision 1 as of 2004-09-03 19:51:01
Size: 1791
Editor: limodou
Comment:
Revision 2 as of 2004-09-03 19:58:31
Size: 2432
Editor: limodou
Comment:
Deletions are marked like this. Additions are marked like this.
Line 35: Line 35:
 *  * 对于comments的配置,需要增加:
   * py['comment_dir']变量 (我的是/var/www/html/limodou/comments)请注意一定要给它足够的权限,我反正是给了个777
   * py[['comment_ext']用于设置注释文件的后缀 (我设为cmt)

{{{
py['comment_dir']='/var/www/html/limodou/comments'
py['comment_ext']='cmt'
}}}

   生成注释时会在comment_dir目录下生成与catelog一样的目录。如entries目录下有一个python的分类,则对python下的文档进行注释时,会在comments目录下生成一个python目录,然后将信息存放其中。

   * 在py['load_plugins']中增加'comments'

添加comments插件

-- limodou [DateTime(2004-09-03T19:51:01Z)] TableOfContents

添加comments插件

comments包含一系列的插件,有:comments, traceback, xmlrpc_pingback, commentAPI等插件,这要主里讲述了comments, traceback, xmlrpc_pingback的安装

说明

这里所有的目录都是按我写的["pyBlosxom的安装及配置"]一文而来:

  • blog起始目录: /var/www/html/limodou
  • blog记录存放目录: py['datadir']='/var/www/html/limodou'
  • plugins存放目录:py['plugin_dirs']=['/var/www/html/limodou/plugins']
    • 请注意在config.py中检查这个变量是否设置正确
  • comments/traceback/xmlrpc_pingback都要用到PyXML模板,因此需要下载并安装[http://pyxml.sourceforge.net/ PyXML]

安装

参考文档见:[http://wiki.subtlehints.net/moin/InstallingComments 安装Comments]

  • 安装PyXML请看它的README说明。简单地说要执行两步:
    • python setup.py build
    • python setup.py install
  • 准备,所有要用的东西已经在PyBlosxom的共享目录下的(我的是/usr/local/share/pyblosxom-1.0.0/contrib/)的plugins/comments/目录下了。它有两个目录,一个是plugins,存放有:comments, traceback,, xmlrpc_pingback, commentAPI这四个插件。另一个是flavour,存放comments的模板样式。

  • 拷贝plugins目录下的所有东西到你的blog目录下的plugins目录中(我的是/var/www/html/limodou/plugins)
  • 将flavour目录下的所有东西拷贝到你的blog记录存放目录(我的是/var/www/html/limodou/entries)

配置config.py

进入你的blog目录 (/var/www/html/limodou),编辑 config.py

  • 正确配置py['plugin_dirs'] (我的是/var/www/html/limodou/plugins)
  • 对于comments的配置,需要增加:
    • py['comment_dir']变量 (我的是/var/www/html/limodou/comments)请注意一定要给它足够的权限,我反正是给了个777
    • py[['comment_ext']用于设置注释文件的后缀 (我设为cmt)

py['comment_dir']='/var/www/html/limodou/comments'
py['comment_ext']='cmt'

  • 生成注释时会在comment_dir目录下生成与catelog一样的目录。如entries目录下有一个python的分类,则对python下的文档进行注释时,会在comments目录下生成一个python目录,然后将信息存放其中。
  • 在py['load_plugins']中增加'comments'

PyBlosxomIniComments (last edited 2009-12-25 07:19:03 by localhost)