Skip to content

phpDocumentor template that generates Markdown documentation of the public API

License

Notifications You must be signed in to change notification settings

cvuorinen/phpdoc-markdown-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpDocumentor markdown-public template

phpDocumentor template that generates Markdown documentation of only the public API. It will skip all abstract classes and non-public methods.

The main use-case for this template is to generate simple and nice looking usage documentation, that can then be published on GitHub.

For example, a small library can document it's public API in DocBlock comments, use this template to generate the Markdown documentation and then commit it to GitHub with the library to easily create a nice looking documentation for other developers to see.

Example of documentation generated with this template: https://github.com/cvuorinen/raspicam-php/tree/master/docs

Installation

Install with composer:

composer require cvuorinen/phpdoc-markdown-public

Usage

Run phpDocumentor and set template as vendor/cvuorinen/phpdoc-markdown-public/data/templates/markdown-public.

Example using command-line arguments:

./vendor/bin/phpdoc --directory=src/ --target=docs/ --template="vendor/cvuorinen/phpdoc-markdown-public/data/templates/markdown-public" --title="My Project Documentation"

More information about the available arguments can be found at running phpDocumentor.

Example using configuration file:

Add a file called phpdoc.xml with the following content to the root of your project and invoke the phpdoc command without arguments. Modify the configuration to suit your project.

<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
    <title>My Project Documentation</title>
    <parser>
        <target>build</target>
    </parser>
    <transformer>
        <target>docs</target>
    </transformer>
    <transformations>
        <template name="vendor/cvuorinen/phpdoc-markdown-public/data/templates/markdown-public" />
    </transformations>
    <files>
        <directory>src</directory>
        <ignore>test/*</ignore>
    </files>
</phpdoc>

More information about configuring phpDocumentor.

About

phpDocumentor template that generates Markdown documentation of the public API

Resources

License

Stars

Watchers

Forks

Packages

No packages published