16

PhpDocumentor のカスタム テンプレートを作成する必要があります。問題は、template.xml絶対パスとして指定されている場合でも、で定義されたパスが正しく解決されないことです。PhpDocumentor は vendor ディレクトリでそれらを探します。

<template>
    <author>Code Mine</author>
    <email>office@code-mine.com</email>
    <description>Template for Confluence API</description>
    <version>1.0.0</version>
    <transformations>
        <transformation writer="twig" source="./index.html.twig" artifact="index.html"/>
        <transformation query="indexes.namespaces" writer="twig" source="./namespace.html.twig" />
        <transformation query="indexes.classes" writer="twig" source="./class.html.twig" />
    </transformations>
</template>

小枝テンプレートがxmlが参照するパスにあるという事実にもかかわらず、ファイルが存在しないというエラーが発生しています。

編集:

phpdoc.xmlまた、パスが構成ファイルに関連していると見なされることを期待して、すべての構成の詳細を設定しようとしましたが、うまくいきませんでした。

4

2 に答える 2

0

間違っている場合は訂正してください。ただし、CLI でファイル パスを渡すだけでよいようです。

https://www.phpdoc.org/docs/latest/getting-started/changeing-the-look-and-feel.html

カスタム テンプレートの使用 会社またはプロジェクト ブランドのテンプレートがある場合、テンプレートのフォルダーの場所を指定することで、それを phpDocumentor で使用することもできます。

$ phpdoc -d "./src" -t "./docs/api" --template="data/templates/my_template"

vendors ディレクトリからバックアウトする必要があるかもしれません..

--template="../../data/templates/my_template"

または絶対パスを渡す

--template="/var/scratch/foo/data/templates/my_template"
于 2016-06-01T06:31:39.510 に答える