├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── data └── templates │ └── contao │ ├── class.md.twig │ ├── index.md.twig │ ├── method.md.twig │ ├── template.xml │ └── toc.md.twig └── src └── Extension ├── TwigClassPublicMethods.php └── TwigMarkdownAnchorLink.php /.gitignore: -------------------------------------------------------------------------------- 1 | composer.phar 2 | vendor/ 3 | composer.lock 4 | .idea -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Carl Vuorinen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # phpDocumentor markdown-public template 2 | 3 | [phpDocumentor template](http://www.phpdoc.org/docs/latest/getting-started/changing-the-look-and-feel.html) that generates Markdown documentation of only the public API. It will skip all abstract classes and non-public methods. 4 | 5 | The main use-case for this template is to generate simple and nice looking usage documentation, that can then be published on GitHub. 6 | 7 | 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. 8 | 9 | Example of documentation generated with this template: https://github.com/cvuorinen/raspicam-php/tree/master/docs 10 | 11 | ## Installation 12 | 13 | Install with composer: 14 | 15 | ```bash 16 | composer require cvuorinen/phpdoc-markdown-public 17 | ``` 18 | 19 | ## Usage 20 | 21 | Run phpDocumentor and set template as `vendor/cvuorinen/phpdoc-markdown-public/data/templates/markdown-public`. 22 | 23 | **Example using command-line arguments:** 24 | 25 | ```bash 26 | ./vendor/bin/phpdoc --directory=src/ --target=docs/ --template="vendor/cvuorinen/phpdoc-markdown-public/data/templates/markdown-public" --title="My Project Documentation" 27 | ``` 28 | 29 | More information about the available arguments can be found at [running phpDocumentor](http://www.phpdoc.org/docs/latest/guides/running-phpdocumentor.html). 30 | 31 | **Example using configuration file:** 32 | 33 | 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. 34 | 35 | ```xml 36 | 37 | 38 | My Project Documentation 39 | 40 | build 41 | 42 | 43 | docs 44 | 45 | 46 |