Skip to content

Commit bfd026f

Browse files
authored
Merge pull request #476 from greg0ire/per-project-settings-docs
Document how to configure the tool
2 parents 12cbf35 + f320dfe commit bfd026f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

docs/configuration.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. include:: /include.rst.txt
2+
3+
=============
4+
Configuration
5+
=============
6+
7+
Global configuration
8+
====================
9+
10+
Settings that you want to have regardless of the documentation you are
11+
building should live in ``guides.xml`` in the current working directory.
12+
13+
14+
Per-manual configuration
15+
========================
16+
17+
If you need different settings for different manuals you are building,
18+
you can do so by creating a ``settings.php`` file in the input directory
19+
of the manual you are building (that is the directory you would specify
20+
as a first argument to the CLI).
21+
22+
That file needs to return a ``ProjectSettings``, and typically looks as
23+
follows:
24+
25+
.. code-block:: php
26+
27+
<?php
28+
29+
use phpDocumentor\Guides\Settings\ProjectSettings;
30+
31+
return new ProjectSettings(
32+
title: 'My Documentation',
33+
version:'42.12.7'
34+
);

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ You will then find the rendered documentation in the directory output
2828
.. toctree::
2929
about
3030
usage
31+
configuration
3132
extension/index
3233
rst-reference/index

0 commit comments

Comments
 (0)