Guides

Configuration

The cli tool is able to read configuration from a guides.xml file. You should put this file in the current working directory where you execute the tool. Generally speaking, this is the root of your project.

Using a configuration file allows you to set project-specific settings and keep them under version control. Not all options available in the configuration are available on the command line. Such as the Extension configuration.

The guides.xml file is not required. If it is not present, the tool will use the default configuration.

Global configuration

Settings that you want to have regardless of the documentation you are building should live in guides.xml in the current working directory.

<?xml version="1.0" encoding="UTF-8" ?>
<guides xmlns="https://www.phpdoc.org/guides"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="https://www.phpdoc.org/guides vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
        input="docs"
        output="build/docs"
        input-format="rst"
>
    <project title="phpDocumentor Guides"/>
</guides>

See the guides.xsd file for all available config options.

Extension configuration

Some extensions allow extra configuration to be added to the guides.xml

<?xml version="1.0" encoding="UTF-8" ?>
<guides xmlns="https://www.phpdoc.org/guides"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="https://www.phpdoc.org/guides vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"

        html-theme="bootstrap"
>
    <extension class="phpDocumentor\Guides\Bootstrap" />
    <extension class="phpDocumentor\Guides\Code">
        <language name="php" />
    </extension>
</guides>

If you want to learn more about the extensions, see the Extensions documentation.

Search results