dcramble/phpdoc-md

PHP documentation generator, with markdown output

v0.1.1 2014-10-30 19:02 UTC

This package is not auto-updated.

Last update: 2024-04-09 01:49:42 UTC


README

This script will generate markdown (.md) API documentation files from a PHPDocumentor XML output file.

It only documents classes and interfaces.

This project was originally developed by Evert Pot. See his repo for more details.

Take a look at some Example Markdown API Docs.

Installation

This project assumes you have composer installed.

$ composer require dcramble/phpdoc-md "~0.1"

Usage

First ensure that phpdocumentor 2 is installed somewhere, after, you must generate a file called structure.xml.

The easiest is to create a temporary directory, for example named docs/ as phpDocumentor2 creates a lot of 'cache' directories.

# phpdoc command
mkdir docs
cd docs
phpdoc  -d [project path] -t . --template="xml"
rm -r phpdoc-cache-*

# Next, run phpdocmd:
phpdocmd structure.xml [outputdir]

Options

--lt [template]
    This specifies the 'template' for links we're generating. By default
    this is "%c.md".

--namespaced-names
    This specifies the fully qualified classes, with namespaces, should
    be printed.

This should generate all the .md files.