Download the PHP package jakota/documentation-builder without Composer
On this page you can find all versions of the php package jakota/documentation-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jakota/documentation-builder
More information about jakota/documentation-builder
Files in jakota/documentation-builder
Package documentation-builder
Short Description Build documentation with Sphinx from inside your PHP code.
License GPL-2.0-or-later
Informations about the package documentation-builder
Documentation Builder
Build documentation with Sphinx from inside your PHP code.
Prerequisites
Detailed Usage
Add as require-dev
Create documentation folder like Documentation in the project root
Add documentation blocks aka DocBlocks to your php files
The project needs a Index.rst to start from.
Add the following comment to a file.
Usually the main class or a file in the start folder.
It doesn't matter where this comment is located but it must not be found more than once.
You can edit the text to your liking but don't remove the TocTreeInsert placeholder.
Next you want to add more DocBlocks to your PHP code.
Every line between
and
will be coped without the leading *
into the file Demo/Index.rst
.
And if TocTree:
is set, this file will also be added to the TocTree in the main Index.rst
.
You can add multiple DocBlocks wherever you want to one file.
But it is important that the indent of every line stays the same per DocBlock.
Config JSON
Create a folder for the config json and static files in your project root and name them whatever you like.
A recommended folder structure looks like this:
The content of this documentation.json file looks like this:
StartFolder and DocumentationFolder are relative to the Project-Root.
StaticFolder and TemplatesFolder are relative to the folder for the config.
Again, you can edit the config to your liking.
But for now only html
is supported as DocumentationType
.
You will see an error message if the config is not as expected.
Run the build script from your project root
For example: