Reputation: 405
Can someone tell me :
Thk.
Upvotes: 5
Views: 5554
Reputation: 11213
I downloaded the phpDocumentor.phar and was also somewhat confused as to the available templates. This is from the source on github at version 2.8.3
For phpDocumentor 3, available templates listed on github are:
Upvotes: 4
Reputation: 1101
Where to download new templates
There is not an "official" page for this; you have to search on the internet.
However, if you'd want to try VuePress, you can use a compatible template nelson6e65/phpdoc-vuepress I created (see a demo).
How to install a template to override the default
There are many ways of installing a template: manual download, using Composer, etc...
The important thing is where is installed the "new" template and then, like stated in documentation, you can use an external template by passing ---template
with the location of your template (the directory where template.xml
is):
$ phpdoc -d "./src" -t "./docs/api" --template="data/templates/my_template"
For example, for the template I linked before, you can achieve this by running:
# Installing
$ composer require --dev nelson6e65/phpdoc-vuepress
# Using
$ phpdoc -d=src/ -t=docs/api/ --template="vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress"
In this case, this template.xml
file is installed in a relative path of your project: vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress/template.xml
Note: I am getting an error on using custom templates if I use the
*.phar
. So, you may need to use another distribution method of thephpdoc
.
Where is the default templates folder
Depending on your installation method.
If you used a Composer install or downloaded the sources, the templates folder is relative to where is installed data/templates. For Composer, is located at:
vendor/phpdocumentor/phpdocumentor/data/templates/
For global install via composer, templates are located ad
~/.config/composer/vendor/phpdocumentor/phpdocumentor/data/templates
I hope this is useful for you and others. Regards! :)
Upvotes: 0
Reputation: 405
--template in the phpdoc cmd line or edit /usr/share/pear/phpDocumentor/data/templates/phpdoc.tpl.xml and change the line " with the template name to use as default.
Default template dir is usr/share/pear/phpDocumentor/data/templates
Upvotes: 1