【问题标题】:PhpDocumentor : How to choose templates?PhpDocumentor:如何选择模板?
【发布时间】:2014-03-26 19:01:20
【问题描述】:

最近我遇到了 PhpDocumentor。它看起来像一个很好的文档工具。我想使用 'responsive-twig' 作为 phpDocumentor 附带的模板。 我试过了;

  • --template="responsive-twig" 在命令行中使用 phpdoc,它说“错误:遇到未知的命令行选项“--template”,请使用 phpdoc -h 寻求帮助”

  • 在 /usr/share/php/phpDocumentor/data/phpdoc.tpl.xml 中将 'template' 标签的 'name' 属性更改为 'responsive-twig',默认为 'clean'

  • 在 /usr/share/php/phpDocumentor/phpdoc.dist.xml 中将 'template' 标签的 'name' 属性更改为 'responsive-twig'

但是我无法更改默认模板。

我已经通过 PEAR 安装了 phpDocumentor。我有三个 phpDocumentor 目录。一个在 /var/www 中,另外两个('phpDocumentor' 和 'PhpDocumentor')在 /usr/share/php 中。

/usr/share/php/phpDocumentor/data/templates 下有一个“responsive-twig”文件夹。

请帮忙!

【问题讨论】:

  • 您是从 phpdoc 频道还是从默认频道安装 phpDocumentor?在命令行输入phpdoc --version会得到什么?
  • 我已经按照这篇文章中给出的步骤安装了 phpDocumentor:link。 phpdoc --version 给出该错误:错误:遇到未知命令行选项“--version”,请使用 phpdoc -h 获取帮助
  • 如果你输入pear info phpdoc/phpDocumentor会发生什么?报告什么版本号?如果您输入phpdoc -h,是否将--template--version 列为选项?
  • 它提供了有关 phpdoc 的详细信息。例如发布日期:2014-02-26 21:00:50,发布版本2.3.1(稳定)。 --template 和 --version 未列出
  • 非常非常奇怪。我想知道您是否安装了两个不同的版本并且它们相互干扰。如果您输入pear info PhpDocumentor 会发生什么,注意缺少的phpdoc/?如果返回任何内容,我会尝试卸载这两个版本,然后重新安装版本 2。

标签: php templates phpdoc phpdocumentor2


【解决方案1】:

仅供参考, 成功如下:

yum install graphviz
pear install Image_GraphViz
rm -rf /tmp/phpdoc-twig-cache
phpdoc -d ./joomla-cms/libraries -t ./joomla-doc --template=responsive-twig

使用最新的 phpDocumentor 版本 2.8.1
可能会有所帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-11-13
    • 1970-01-01
    • 1970-01-01
    • 2016-02-04
    • 1970-01-01
    • 1970-01-01
    • 2017-11-20
    相关资源
    最近更新 更多